Syntax in Different Programming Languages - DonationCoder.com
Welcome Guest.   Make a donation to an author on the site August 05, 2015, 05:28:29 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2015! Download dozens of custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Syntax in Different Programming Languages  (Read 1703 times)
anandcoral
Honorary Member
**
Posts: 293



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« on: March 02, 2015, 11:04:50 AM »

Hi DC Members,

With ref. to
1. Experimenting with Other Programming Languages http://www.donationcoder....70531;topicseen#msg370531
2. http://en.wikipedia.org/w...ng_languages_%28syntax%29
3. http://rigaux.org/languag...tax-across-languages.html

I was planning to make a google sheet with rows having the most common code syntax names and columns with different programming languages and column cells filled with the code syntax of that programming language.

Something like Syntax in Different Programming Languages https://docs.google.com/s...nbre8O8M/edit?usp=sharing

Well the above is just for the starting idea.

Now comes the major point :
To have something like this needs programmers with the knowledge of the given language. I can only see DC members has the knowledge and can fulfill it.

How it is going to help :
Programmers trying to learn a new language can have the two languages columns visible (one being the language he/she know) and learn.

I think this will boost learning. It had helped me very much in my earlier days, like C++ for Basic Programmers.

Now it may be that a similar sheet, website with more features, already exist. Or some DC member already has something like it.

It would be better if we could make a website which asks for the two languages and shows the html pages for them only, no filtering / hiding in a sheet. I do not have expertise on it. In fact I will like the sheet to be maintained by our DC website for all programmers of the world.

I need guide and direction on this. Please help.

Regards,

Anand
Logged
ewemoa
Honorary Member
**
Posts: 2,681



View Profile Give some DonationCredits to this forum member
« Reply #1 on: March 03, 2015, 07:02:04 PM »

On a possibly related note, are you familiar with Rosetta Code?
Logged
wraith808
Supporting Member
**
Posts: 7,203



"In my dreams, I always do it right."

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: March 03, 2015, 07:19:26 PM »

One of my best classes in college was a class called The Organization of Programming Languages.  It was taught by someone who was giving back time as a professional in the industry, rather than a professor.  Many years later, it is one of the only ones that sticks in my mind and that I use.  I've gone from and to many different languages - Pascal to VB to C to C++ to Delphi to C# (and I currently dabble in a few others).  The syntax has never been the problem.  You can always find syntax.  It's the data structures and memory management and such that are always the sticking point.  If you can get those, you can rapidly move from one language to another with a minimum of difficulty.

Rosetta Code seems to handle the approach to moving between languages in that way at a more granular level.  Not to dissuade you, but I'm just not sure how much a syntax mapper will actually be used.

Of course, it could be based on how you learn, so perhaps it's just me.
Logged

ewemoa
Honorary Member
**
Posts: 2,681



View Profile Give some DonationCredits to this forum member
« Reply #3 on: March 24, 2015, 07:19:02 AM »

On a related note, came across the following recently:

  http://learnxinyminutes.com/
Logged
mouser
First Author
Administrator
*****
Posts: 34,842



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: March 26, 2015, 03:00:17 PM »

Very related: http://hyperpolyglot.org/
Programming Languages - commonly used features in a side-by-side format

I like this one -- no filler just tables showing how small snippets of code would look in different languages.
Logged
x16wda
Supporting Member
**
Posts: 581


what am I doing in this handbasket?

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #5 on: March 26, 2015, 09:34:24 PM »

I like this one -- no filler just tables showing how small snippets of code would look in different languages.
But no Rexx.  Sad
Logged

vi vi vi - editor of the beast
anandcoral
Honorary Member
**
Posts: 293



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #6 on: March 27, 2015, 03:28:50 AM »

mouser you are near what I want. http://hyperpolyglot.org/ has the comparison side-by-side.

But it is grouped in similar type of languages but I want any languages side-by-side. Say I know VB and want to convert an VB app in C#. Logic does not depend on any language, just the syntax I need to know when I am stuck. hyperpolyglot is not allowing for VB and C# comparison. That's why I was thinking of making the sheet and having option to hide columns to get two languages side-by-side comparison.

Or may be there is a website as I want in the wilderness.

Regards,

Anand
Logged
ewemoa
Honorary Member
**
Posts: 2,681



View Profile Give some DonationCredits to this forum member
« Reply #7 on: July 27, 2015, 06:33:17 AM »

Just wanted to mention that I came across the Hyperployglot site again today -- the side-by-side comparison was handy for a particular situation I was investigating smiley
Logged
f0dder
Charter Honorary Member
***
Posts: 8,849



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #8 on: July 27, 2015, 01:26:58 PM »

How useful is a site like HyperPolyglot, though?

If you're at a proficiency level with the target language that you need to site, will you be able come up with something useful by looking at a cheat sheet? I don't think a"mechanical translation" like that wouldn't end up would result in good code, unless that languages are extremely similar (Java <> C#, for instance).

I think something that would be valuable would be samples of how to write ideomatic code in the target languages (requiring the user to be familiar with basic syntax) - but it's hard to do that with side-by-side comparisons, since different languages tend to solve different problems.
Logged

- carpe noctem
wraith808
Supporting Member
**
Posts: 7,203



"In my dreams, I always do it right."

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: July 27, 2015, 02:02:06 PM »

How useful is a site like HyperPolyglot, though?

If you're at a proficiency level with the target language that you need to site, will you be able come up with something useful by looking at a cheat sheet? I don't think a"mechanical translation" like that wouldn't end up would result in good code, unless that languages are extremely similar (Java <> C#, for instance).

I think something that would be valuable would be samples of how to write ideomatic code in the target languages (requiring the user to be familiar with basic syntax) - but it's hard to do that with side-by-side comparisons, since different languages tend to solve different problems.


Very well stated, and this is exactly what I was trying to say earlier.  Thmbsup
Logged

ewemoa
Honorary Member
**
Posts: 2,681



View Profile Give some DonationCredits to this forum member
« Reply #10 on: July 27, 2015, 06:04:29 PM »

FWIW, the situation in question was indeed for multiple similar languages (trying to express something in Clojure, but much more familiar with Emacs Lisp and Scheme).  The page being examined was:

  http://hyperpolyglot.org/lisp

For idiomatic usage, I tend to look for "Cookbook" types of documents (e.g. https://github.com/clojur...cookbook/clojure-cookbook), but perhaps the Rosetta Code site mentioned earlier can also help.
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.042s | Server load: 0.1 ]


Share on Facebook
submit to reddit