Hi folks, please tell me if I’m smoking funny bananas:
Coding in ecmascript is painful. This syntax was invented in 1969, and Meteor is supposed to be a modern framework?
But coding in coffee script and jade is great
But wait, coffee script seems buggy in Meteor, right. Some weird stuff happens with no rhyme or reason
OK, so how do Meteor programmers set breakpoints and step through server side code so I can learn how all this stuff works. Are there any nice tools, or is it mostly done with console.log
It sounds a bit negative, but really, Meteor is awesome… as long as I can convince myself that it’s not buggy, and that there are “Modern” tools, like the ones we had back in 2006
1969 is the year C was invented. The basic syntactical style of javascript is based on C, regardless of the version. To be more precise, the syntax is based on Java, with a bit of Perl and Smalltalk like influences thrown in here and there.
But coffee script does take that pain away. I will write a different post outlining some of the buggy behaviours I’ve encountered (only in server side coffee script)
Looks like JetBrains Webstorm can be used as an IDE for modern style debugging of server side node.js.
to be honest C belongs to the family of ALGOL languages, whose syntax first appeared in 1958.
Yes coming from the DRY python javascript seems so verbose… erorr prone and pleonastic. I
t got MUCH better with ES2015, but still sucks. Anyhow JS is the de facto standard of the web, and Coffee is very nice but not updated much, so it lacks some power features of modern JS.
You gotta eat the sour taste of JS, but you will be better than the average JS dev, as you will always remember the sweet Python Land, and try to write code as expressive as possible.
I’m definitely Old School, but it wasn’t meant to be a complaint, just a comment on the fact that coffee script is available and makes the job a lot more pleasant.
coffee script is nearly the exact same language as ecmascript from a conceptual point of view. It is still this object-oriented language with a touch of functional programming. The difference in practise is neglectable.
I also thought that coffeescript makes things easier, but i think this is no longer true in comparison with ES2015. I would recommend to use ES2015 as it is a standard. It is not the best language, but it gets the job done and supports many different paradigms.
By the way. Try a real functional programming language if you don’t want to feel oldschool anymore. That is a breeze of fresh air.
@hexatonic Don’t knock JS until you really try it. Here’s my story as a former Pythonista:
When I first picked up Python, I remember reading this post Python is Not Java in which the author complains about Java-developers abuse of the python language. Coming from Java/C# it took me a few years to really understand how to write “pythonic” code.
Similarly I can imagine a similar “ES is not Python” article. After five years of using JS => coffeescript => ES2015, I greatly prefer ES2015 to Python. Why? In addition to better tooling, documentation, package system, web development, etc., there are a bunch of code patterns – mostly around Javascript’s ease of creating multiline anonymous functions, something that’s not possible with python lambda – that make me prefer the JS language despite some of its other warts.
Quick examples to get concrete:
Jasmine scoping is really slick, and AFAIK impossible in python
Underscore based entirely on anonymous functions. Some of its features are language features in Python (e.g. zip), but even so I think they’re better in JS.
When I switched from Coffeescript to ES2015 I certainly missed indentation-based scoping. But the benefits outweighed the costs. Also semicolons are optional in JS, and removing them cleans up your code. At this point the only thing I miss from Python is the array slicing features, especially in numpy which AFAIK wouldn’t be possible in JS.
Tried it. Didn’t like it due to the ambiguities it creates. I rather have a bit more verbose style using brackets and braces and don’t have to think about which part is actually evaluated in which order.
Gonna put this out there: I love curly braces, having indentation-based syntax is strictly a minus for me. But I understand that people have different preferences and that’s great!
I understand your concerns as I, myself, came to JavaScript from Python. I don’t do a lot of Meteor (although I really like it), I actually do Angular stuff for a living. At the beginning, I struggled a lot to grasp the so called Good Parts of the language, and discovered the Bad Parts along the way; but that wasn’t the truth about JavaScript, there is no “Good Parts” nor “Bad Parts”, the language is just misunderstood.
When I read Kyle Simpson’s “You Don’t Know JavaScript” series, I was like illuminated, the language actually has really solid foundations and I encourage you to give raw JavaScript a shot. It’s like love and marriage, TRUE love comes after years of marriage not before it.