Hacker News new | past | comments | ask | show | jobs | submit login

Agreed. JavaScript has no real upside here besides being fashionable. whereas built-in C# with access to the .Net framework would be really powerful.



JavaScript has a huge upside because a lot of people already know JavaScript. The more tools and platforms switch to JavaScript the more of an office superhero users are when they know something about the language. The productivity of employees will jump off the charts. When you send someone to train for one thing that utilizes JavaScript you get the benefit that those skills may also happen to work with something else as well.


At some point, I hope we can get past this argument. Learning a new language for rudimentary tasks is not particularly hard. I'm not sure why people decided that JavaScript of all things was what we had to all latch onto.


I have a friend that wanted to learn programming. I suggested Python, but they wanted to go directly into making web apps.

I don't think they finished the class. Javascript just has too many weird concepts (what's the difference between null and undefined and false and 0 and "") that distract from the mechanics of learning what a computer program is, and I also think that the desire to make something others can use too early on leads to going too quickly through the basics ("yeah yeah, add numbers, who needs to do that") and are then overwhelmed when things like objects and promises show up. You have to crawl before you walk.

I think if I were going to introduce someone to programming today, I'd probably pick CircuitPython. Python is simple and makes sense almost immediately. Doing it on a microcontroller lets you make something "neat" almost immediately, and you're spared a lot of the complicated externalities of the real world. (HTML, CSS, dev servers, npm modules, etc.) Some day you can learn all that stuff, but you need to know about if statements and loops and variables first.

I also miss the days of BASIC and Logo. I think those would be fun for the younger generation... but now everyone just wants to make a mobile app and those don't get you there. Ahh, for simpler times.


Since we are in a VBA thread, I'd argue that VBA is a great introduction itself into programming; especially with its macro recorder.

Progamming by clicking (in the spreadsheets) and seeing how the code changes instantly is arguably better for beginners than what normal programming languages usually offer.


You're right, we should automate everything with Rust \s

People both over and underestimate the ability of users to learn a language for quick scripting/automation. Languages like Bash, Python, JS, VBA... they're extremely accessible for quick and dirty work, which is why people latch on to them compared to others.


> You're right, we should automate everything with Rust \s

I did chuckle a bit.

Accessibility is key, so is documentation, so is flexibility, but again I re-itterate, the right tool for the job matters most.


Because it’s the new Franca lingua of programming. Everyone knows it whether they like it or not. There’s value in not have to switch context while programming. Also there’s typescript which makes JavaScript usable. I don’t like JavaScript either but typescript isn’t terrible and the ecosystem is much bigger than any Microsoft programming ecosystem which results in less reinventions of the wheel. MS has also been treating JavaScript as a 1st class citizen on Windows


> MS has also been treating JavaScript as a 1st class citizen on Windows

Eh what now?

The ActiveSctipt host for JScript (for shell and Classic ASP scripting) hasn’t been updated since Windows 2000, and for shell scripting in-general Microsoft has been (“was” at this point?) pushing PowerShell since its demo at PDC 2003.

WinJS for Windows 8 was a huge waste of money for the company that people always seem to forget.

And their Chakra JS engine is effectively now retired given Chromium+V8 replaced EdgeHTML earlier this year.

The only places Microsoft has been using JS are for their current set of Electron-based applications (VS Code, Skype, MS Teams, Azure Storage Explorer, etc). TypeScript is nice and all (and I really love it and I hope it brings algebraic typing and structural typing to more languages) but it’s only popular because Google, of all people, adopted it for Angular.


I suspect that we are reaching peak javascript, that wasm will open the browser to all languages and that javascript will compete based on its own merits rather than its historical monopoly.


It kind of won in a lot of ways... biggest package ecosystem. The most developers using it. Highly optimized runtime. Supports the use of OO, Functional and Procedural paradigms. Able to run in the browser for online versions. Cross platform and nearly ubiquitous.


>biggest package ecosystem.

I don't understand how you can be proud of having the most unusable package ecosystem. Sure the numbers are large but can you actually safely use those packages? No, you can't. Just add a single library and you will include a huge amount of transitive dependencies from random package maintainers over which you have no control.

Other languages like Java or Rust have the same problem but this is a problem with exponential impact and NPM is the leader in tree depth. Having a 10 layer deep dependency tree is far worse than a 7 layer deep dependency tree. When I look at the dependency tree of my own projects more than 50% of the libraries are first party and from a vendor with a good reputation. (spring, apache commons, tomcat). The rest are less trust worthy but each project has a small opensource community that consists of more than just a random guy that may randomly throw emotional fits like in the leftpad scenario.


That comes down to due diligence... I look at my bundle outputs and overall package size... I also review the packages I use, and tend to avoid anything that isn't open source. I've also forked packages that have issues I need resolved.

You have all the control in the world, and just because someone is lazy doesn't mean it doesn't work. Beyond this, you probably don't review every single line of code that goes into your applications dependencies regardless of language. It's about impedance vs productivity for the most part.

I tend to, at least with front end projects focus on koa for the server tethered to the UI, React and material-ui ... nearly everything else is one-off building from there. Unless you think the likes Facebook and Google are just one random guy.


Most potential users of VBA don’t know JavaScript or any other language. And VB is way more accessible than JavaScript.


On that I agree... Python would probably be a better option if there weren't a need for cross platform support including in-browser. Also, I'm not sure if there's a good path from Python to JS or Wasm for browser usage.

I love JS, but it's not that accessible and a poor first language for people. I just enjoy the shear flexibility of it.


Sure, but it's not as big as an ecosystem. Knowing JavaScript at this point is way more valuable than learning VBA. I'm not saying VBA is bad, I think visual basic is great, I have fond memories of it, but reality is JavaScript is going to be what companies are going to want their employees to know.


Can JavaScript use COM libraries and windows APIs? The JavaScript ecosystem is big but I doubt it covers much of what a typical VBA application needs. I think C# or another .Net language would be more suitable.


If there isn't now, I imagine it will come. There's:

https://docs.microsoft.com/en-us/microsoft-edge/windows-runt...

I'm sure Microsoft is probably at least considering making JavaScript work well with existing Windows APIs.


I think that's deprecated. They dropped support for UWP apps with JavaScript in Visual Studio 2019:

https://social.msdn.microsoft.com/Forums/en-US/ebb5e04b-d00a...


My guess is that they will retire from having to program one day.


Comparing javascript to C# is really not appropriate here, for so many reasons. I do think you know the main differences between interperated, transpiled and compiled for starters, but the "right tool for the job" is far more important.

Being fashionable is also not exactly fair, it was very flakey before jQuery created some entry level standard, because of its popularity it grew to what it is today, if thats 'fashionable' then I support it.


> Comparing [JavaScript] to C# is really not appropriate here, for so many reasons. I do think you know the main differences between [interpreted], transpiled and compiled for starters...

Are you saying there is a fundamental difference between JavaScript and C# in this regard? I don't think there is.

Each language has a compiler that compiles source code to bytecode. Each has an interpreter that can directly execute that bytecode, and a Just In Time compiler that can compile the bytecode into native machine code.

These languages, along with Java, are pretty much identical with regard to these distinctions.

Transpiled and transpilation are ugly and unnecessary words. They are just a fancy way of saying compiled and compilation.

Some make a distinction between a transpiler and a compiler; however this is a distinction without a difference. A compiler transforms source code into object code. The source code or the object code may be a "low level" language like bytecode or machine code. Or either may be a "high level" language.

For example, TypeScript has a compiler that compiles TypeScript code into JavaScript. [1]

The original implementation of C++ was Cfront, a compiler that compiled C++ code into C code. [2]

For that matter, "machine code" on modern CPUs is a high level language of its own, which bears little resemblance to the low level operations that happen within the CPU.

[1] "The command-line TypeScript compiler can be installed as a Node.js package." https://www.typescriptlang.org/

[2] Personal discussion with Bjarne Stroustrup on BIX around 1985 when I called Cfront a "preprocessor" and he chewed me out and told me it was a compiler just like any other compiler. Also: "Cfront was the original compiler for C++... which converted C++ to C" https://en.wikipedia.org/wiki/Cfront


I am old. I have no idea what interperated is :)


:) Not sure if you're joking or not, so I'll be more rude and ask if you've ever written a compiler for the fun of it.. That will gauge your real age ;)


I'm not sure, but that person may have been attempting to make a joke about your misspelling of "interpreted".


ah.. Well colour me silly! ;) Well played!


On a more serious note: an excel macro language like VBA pretty much needs to be interperated or the compiler needs to be hidden away like VBA does. As user you shouldn’t have to deal with a compiler step. You can do this with C# pretty well as you can with other languages.

Personally I think it would be really cool if they used TypeScript instead of JavaScript.


Especially with Microsoft's creation of Blazor (leveraging WASM) and the .NET Jupyter notebooks, it seems like they'd be positioned to make .NET/C# accessible in the mobile and web platforms too.


Blockpad (http://www.blockpad.net), while not directly exposing C# is written in it so there is certainly potential in the future for such interop.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: