Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am looking for a language that

  1. has First class functions
  2. is dynamic
  3. has prototypical inheritance
  4. does not have too many features (i.e is easy to get into and write first program).

I have been programming in JavaScript for quite some time and have gotten quite fond of it. Are there any other languages that have similar design?

Edit (just some clarification)

I know a bit of c#.After doing some programming in node js I really started to appreciate javascript and ease of its use.However outside of web development javascript falls short.Sure there are libraries like app.js that allows desktop programming but that's about it.Which is why I was looking for a more general purpose sripting language that has the above mentioned features.I listed those features to make the question more in tune with stack exchange policies other wise it would probably have been closed.

share|improve this question
3  
Not sure if this question is on topic here, and personaly I would choose a language preferablyon the kind of project I want to implement. That said maybe Lua would fit your description best. –  thorsten müller Apr 8 '13 at 8:16
2  
Also: Please don't write "Java-Script". Java and JavaScript are as similar as car and carpet. –  Joachim Sauer Apr 8 '13 at 8:21
    
is ActionScript cheating? –  jk. Apr 8 '13 at 8:23
3  
Also: try to learn a language that is not similar to one you already know. This way you'll learn more! –  Joachim Sauer Apr 8 '13 at 8:23
1  
Comparison of JS to other languages: hammerprinciple.com/therighttool/items/javascript –  iCanLearn Apr 8 '13 at 10:10
show 2 more comments

4 Answers

up vote 7 down vote accepted

The language that is most similar to JavaScript is JavaScript, by definition.

Learning something new by learning something that is exactly the same as what you already know is an oxymoron. If you want to learn something new, you have to, well learn something new. Something that is as different as possible, not as similar as possible to what you already know.

That being said, if you want to learn something about JavaScript, I suggest you learn some of the languages that influenced its design the most: Scheme (lexical scoping, nested, first-class and higher-order procedures, procedures/closures instead of objects as the unit of encapsulation, a single ubiquitous powerful data structure), NewtonScript (prototype-based OO) and Act1 (differential inheritance) as well as Self (the prototypical prototype-based OO language which inspired both NewtonScript and Act1).

share|improve this answer
3  
Similar: having a resemblance in appearance, character, or quantity, without being identical. –  Den Apr 8 '13 at 13:01
4  
The OP asked for "most similar", i.e. JavaScript + ε, where ε → 0. And, when learning, that's really not useful. –  Jörg W Mittag Apr 8 '13 at 13:55
add comment

Self has all those features.

It's actually a major inspiration for JavaScript (some say it's the predecessor).

Unfortunately I don't know how much actual use it gets these days (outside of teaching).

share|improve this answer
add comment

You might want to check out Io which is a dynamic prototype-based programming language. The author describes it as conceptually simple, consistent and easily embedded and extended. It's highly dynamic and highly concurrent. The book Seven Languages in Seven Weeks has a chapter about it as well.

share|improve this answer
add comment

Since the other answers cite the languages that inspired Javascript, I'll cite the languages inspired by Javascript. TypeScript and CoffeeScript are very close to Javascript with a few improvements; as jk. pointed out in his comment, there is also ActionScript, which is a bit stricter than Javascript.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.