r/javascript • u/alongub • Nov 09 '14
Introducing Spider: The Next-Gen Programming Language for the Web
https://medium.com/@alongubkin/introducing-spider-f611d97bb47e5
Nov 09 '14
What? Another one?
I like safe property navigation, but this is an up and coming feature of c# which I hope typescript gets. I disagree entirely with your opinion of type safety though.
-2
u/alongub Nov 09 '14
Take a look at Why TypeScript Isn't the Answer
-4
Nov 09 '14
Read it before. Type safety means you need to define interfaces instead of dynamically adding, but the payoff is huge. I write a huge SPA which would be near impossible without type safety.
4
u/ThiefMaster Nov 09 '14 edited Nov 09 '14
x = false or 5; // x == true;
x = 5 and 4; // x == true;
x = 1 == "1"; // false (== compiles to ===)I think the non-boolean behavior is quite nice in JS. So the first line should be 5, the second should be 5 and the first should be a syntax error. Force people to use pareantheses with this to be explicit: x = (1 == 1)
0
7
u/sime Nov 09 '14
Far too close to ES6 to be a compelling alternative.
5
u/skitch920 Nov 09 '14
I agree. Any abstraction between the programmer and the language itself might be nice (and fun) in the short term. But when it comes to brass tacks, you're just adding more maintenance.
3
u/x-skeww Nov 10 '14
TypeScript and AtScript try to fix the wrong problem by adding types.
JSDoc comments are extremely verbose and super annoying to write. Secondly, today's JS tooling is really horrible.
Optional types are great. You get vastly improved tooling and basic documentation by just adding a few type annotations to the "boundaries" like a function's signature or the fields of a class.
Here is my copypasta example:
ES5:
/**
* @param {number} x
* @param {number} y
* @returns {boolean}
*/
Rectangle.prototype.cointains = function (x, y) {
...
};ES6:
/**
* @param {number} x
* @param {number} y
* @returns {boolean}
*/
contains (x, y) {
...
};Dart:
bool contains (num x, num y) {
...
}TS/AtS:
contains (x: number, y: number): boolean {
...
}Looks like a big improvement to me. Even more so if you keep in mind that the tooling of TS/AtS and Dart is much better, too.
2
u/theillustratedlife Nov 10 '14
String interpolation and lambdas shouldn't be your key features - I can use both of those today with jsnext/harmony.
I'd love to see what you've called Safe-Object Navigation in the next version of JavaScript. It seems to be one of the most glaring low-hanging fruit in the language.
1
3
u/daedius Web Components fanboy Nov 10 '14
"I started Spider because none of the existing languages that compile to JavaScript were perfect."
ROFL
1
0
u/tsimon Nov 09 '14
Awesome! I've been looking for a new next-gen programming language for the web!
;-)
0
-6
u/zoomzoom83 Nov 10 '14
In this thread: People that think there can be only one language for every single purpose.
5
Nov 09 '14
[removed] — view removed comment
5
u/Mael5trom Nov 09 '14
0
u/xkcd_transcriber Nov 09 '14
Title: Standards
Title-text: Fortunately, the charging one has been solved now that we've all standardized on mini-USB. Or is it micro-USB? Shit.
Stats: This comic has been referenced 993 times, representing 2.4882% of referenced xkcds.
xkcd.com | xkcd sub | Problems/Bugs? | Statistics | Stop Replying | Delete
24
u/AutomateAllTheThings Nov 09 '14
I call these types of libraries "artificial-sweeteners" because they exist solely to "enhance" javascript with what they consider to be sugar. It's totally cool if people are into these, but I do have reservations about them which makes me feel as though the whole approach is over-engineered:
Javascript is the language that you want your developers most comfortable with, because it is the actual language you end up compiling down to.
Debugging becomes more complicated. You not only have to debug your own application, but also debug when your compiler creates code that's not exactly the way you want it.
You have to train everybody on your team, and all new-hires to use your chosen artificial-sweetener, then re-train them if you switch to another.
The available talent pool is now fragmented. Maybe you'll find the right person, but they are unwilling to use your chose artificial-sweetener.
A large proportion of open-source javascript developers contribute solely in vanilla javascript. You would be limiting the amount of people that are willing to contribute to your project.