97 karma · joined February 5, 2017
make an object:
in ESx:
var myObject= {
a: {
b: {
c: {
d: 'some value'
}
}
}
};
in Coffeescript or Livescript: myObject= a: b: c: d: 'some value'
now use it:in ESx:
console.log myObject.b.c.d // crash, myObject.b does not exist
how to prevent? if ( myObject.hasOwnProperty('b') and myObject.b.hasOwnProperty('c') ){
console.log myObject.b.c.d // undefined
}
in Coffeescript or Livescript: console.log myObject.b?.c?.d // undefined
I can write almost a book with too many of such examples. So, NO it's not an amazing language, I wrote for many years in it and it sucks all the way.And when webassembly arrives that will be over, and Typescript will be deprecated. I can't wait for a better modern language like Haskell, Python, Livescript, etc.. built on top of webassembly. Then we can finally stop trying to fix Javascript's flaws with new language features.
Functions in Coffeescript: -> =>
Functions in Javascript:
var myFunc = function(){}; function myFunc(){} var myFunc = () => {}; in objects: myFunc: function(){} in classes: myFunc(){}
Inconsistency in code is a recipe for bugs.
IMHO this whole Babel, ES5, ES6, ES7, ES???, Typescript thing with it's countless options is much worse than simply Coffeescript with a dynamic type checker. I use the latter in quite some production environments currently. No need for Babel, Typescript, linters etc.. It really makes my life way, way easier, less npm modules, less bugs, less lines of code, much more readable, etc, etc..
And please, before you start preaching all those 'amazing' benefits of Babel, Typescript, linters, ES5, ES6, ESx, I come from that misery and it sucks!
I think in general companies go more and more aggressive and ruthless to remain profitable and fight opposition, that's our economy..
I mean, creating a new type of brush for painters is ok, but I don't see the need for forcing them to redo their old paintings with the new type of brush in order to keep them visible..
IMHO Coffeescript and some other to Javascript transpilers are still a much better language than the entire Babel ES5/ES6/ES7 thing. But for some reason my free choice here is in jeopardy. The community apparently has chosen for Babel and are now happily nihilating things that are not compatible with that.
In my opinion this is not only irresponsible, but very arrogant as well.
Although I do understand and can write higher order components, I still write and use small mixins in projects because it works for me. I also use createClass because I enjoy the autobinding and don't like the possibility to forget calling super.
Now I need to explain my superiors why this warning is shown in the console, making me look stupid using deprecated stuff. And I need to convince them why I need to spend weeks rewriting large parts of the codebase because the community thinks the way I write is stupid. Or I can of course stick to the current React version and wait until one of the dependencies breaks.
It would be really great if library upgrades very, very rarely break things. Imagine if all the authors of the 60+ npm libs I use in my apps are starting to break things this way, for me there is no intellectual excuse to justify that.
I also enjoy refactoring callback code, only without the use of Promises, because I don't prefer them to compose and create a nice readable flow. There is a little learning curve though, but it's not so bad.
I've once had a very nasty bug keeping me busy for days, where somewhere in a complex structure of multiple promises I somehow forgot to return a call to a resolve. With all these new Promise(), .then(), .catch(), resolve's and reject's nested it's very easy to miss one, and very hard to read where the bug sits.
Maybe it's just me, but I never had such a severe bug with the simplicity of the standard async callback pattern. I Never used promises again, still enjoying that decision.
>events generated by the operating system, and your "inking and typing data."
Sounds like a key logger virus, but then built-in the OS? Is this for real?
A while ago I made a website for the company I work for, everything was working flawless across all major browsers including mobile. Then some e-commerce dude asked me to fix a few style issues for Facebook browser. I didn't even know of it's existence by then!
This browser goes way beyond IE6 incompatibility, I spend 2 days in hell trying to fix the style issues, which is nearly impossible because there is not even a proper way to test your changes. To start I first had to install that stupid FB app/virus in my phone, after that everything you type in the address bar generates some totally useless crap suggestions and advertising all the way, it was quite a puzzle/hack to even reach my own development server through all this misery..
I eventually had to decide to redo the entire styling of the website so it works with FB browser, or simply give up. I very fortunately managed to convince my manager to not support FB browser, but I must have lost some credibility that I was not able to fix this seemingly simple style issue.
With very much ease I can ask the interviewer/dev to solve a seemingly simple algorithm, where I'm almost 100% sure he will fail, even if I'd gave him 6 hours to solve it.
I've seen so much horrible code in my life, there is no fizz buzz test that can prevent you from that. I am wary of companies doing these tests as it tells me they have no clue what my work is about.
If a company wants to hire me they can look at some of my production code and the live results of it. If that is not good enough for them I'm not interested.
Some of the characteristics you need to become a leader are: be an excellent lyer, have a good pair of elbows, a desire for power and/or money, fit in the world of wealthy people that are in power, etc..
What do you expect from people with these characteristics? Competence?
I really hoped he would come with a light rail with shuttles carrying (electrical) cars, containers etc.. This is a thought I had some 16 years ago in an attempt to solve traffic jams. I truly believe cars shouldn't drive on highroads. Unfortunately I don't have the contacts and financial power to even get close to the people who can accomplish this.
If we have a world wide network of light rail, carrying electrical cars etc.. at a speed of about 500 mph it would really be more environmental friendly, as it would be a serious competition for polluting aircrafts.
Imagine: Los Angeles -> San Fransisco in less than 1 hour, in your own car!
I think Elon is one of the single few people in the world capable to make a start with this.
> If you don't want to transpile, don't. It's as simple as that.
Are you kidding? Please tell me your estimation of how many developers write in ES6/ES7 without using Babel or other transpiler???
You don't really need to tell me what Types are about, I have a long standing C/C++ background. And I really don't need Typescript. I use dynamic type checking based on ES3, does the job flawlessly already for years. Very rare for me to have a type related bug. I'm always wary of people that preach Typescript; what code do they write to get in so much trouble with types?
> Many would say that someone should be forced to write in a typed language in general in order to be taken seriously.
omg.. 'forced', this is bad.
I'm only looking forward to webassembly, that will be the real game changer and the end of JS as we know it.
No one needs Babel to write stellar code IMHO. Unfortunately it is not about the quality of the code you write, it is about being politically correct. This whole ES6/ES7 thing is much based on what Coffeescript, Livescript, etc.. already did much better more than 5 years ago. And I dare to guess that most of the Babel proponents don't even realise it's just a transpiler that they will need till the end of the projects live.
note: I expect serious down votes as opposing Babel is almost a serious crime nowadays and proves my unlimited stupidity.
No, web development is not really exiting nowadays, it is more terrifying, where the hype goes tomorrow? Maybe soon I will be forced to write in MS Typescript if I want to be taken seriously. Same counts for Redux because Flux is so 2014.. you must be very brave not using Redux! I can go on and on, way too many examples..
Finding a web developer job now is particularly about complying to made up standards that become more complex every day. And I've seen quit some horrible code bases that perfectly comply! It's a very sad reality.