I love this language but everytime people talk about it its about muh frameworks for muh webdev because muh job

I love this language but everytime people talk about it its about muh frameworks for muh webdev because muh job.

Don't you use it as a hobby too?

Attached: images.png (554x554, 5K)

Other urls found in this thread:

msdn.microsoft.com/en-us/magazine/mt829752.aspx
gist.github.com/DanDiplo/30528387da41332ff22b
twitter.com/SFWRedditGifs

You can, but doing things larger than trivial toys in JS is painful, hence why people use frameworks and compilers like typescript.

If you're looking for a language to use for fun you'd probably have more fun learning a less shit language. I'm not going to suggest any because Jow Forums's autism will surge, but JS is almost uniquely situated to be un-fun for hobby use.

Do you know any other language? If you don't then you should try one. Try a language which has a similar syntax to JS so the transition would be easier. Once you learn it, you will realize why so many people hate it and why you "need" so many frameworks.

I've worked with over 20 languages, from prolog to brainfuck, and I personally quite like javascript, especially for hobbies.

I even prefer it over python. (I think python is shit. Well it's not shit, but it's only okay.)

are there some arguments against JS other than "muh 9gag"? Which languages would be preferable?

Javascript is basically the new perl and 100 x better than python and nobody cares.

only 100 times?

>dynamically typed
thats a no from me dawg

>I've worked with over 20 languages, from prolog to brainfuck,
>worked
>prolog
>brainfuck
Héhé, petitcon.

I do, it's a breeze to write in when you're doing things client-side or server-side although all JS engines use way too much ram and working with a JavaScript codebase can be soul sucking at times

Like what?
I do agree with you that JS isn't always fun to work with, but sometimes it is. Depends on what you're using it for really

I guess, I've had a look at and tried out perl and it would fit the most of what I use JS for

I don't use any frameworks, native js works fine for most things.

>are there some arguments against JS other than "muh 9gag"? Which languages would be preferable?
The only reason anybody dislikes Javascript is because it's used in the web and associated with the web and the web is cancer. There's nothing inherent to Javascript that makes it unsafe or unfree, but the fact that all the tracking and datamining shit on the web is written in Javascript means its guilty by association alone.

If web browsers used a different scripting language you'd all hate that instead because it's not the language, but what you do with the language.

I get the same sort of JS feeling from Python 3, but that's just me personally.
JS ES6 classes work surprisingly well too, but I come from a Perl background and when it comes to object oriented Perl you can really see the artifice and the tricks it uses to be more OO.

>petitcon
tais toi batard que tu es, etais et resterais.

js is prototype based, if you forget that you tend to run into invisible walls.

On the other hand, that also opens up new opportunities which are less intuitive in other languages.

This guy is an idiot parroting what he's heard.

This guy is a gentleman who can think for himself.

I agree.

I really like JS because it's easy to share ideas and collaborate. I don't use frameworks, because I feel they hinder the ability to share work/prototypes with other people.

Syntax will always be syntax and every syntax fucking sucks according to someone.

I don't cuck myself by doing resume driven development. But I guess that's a industry-wide problem. For being an industry that fetishes productivity, it's pretty unproductive.

>>worked
>>prolog
>>brainfuck

not that I need to defend myself on the internet, but the brainfuck project was an infinite precision calculator, to show how operations can be constructed. I also wrote a BF compiler for this board in one of these stupid ass threads once.

for the other thing, well, I went to college. feel free to sperg out on autididact elitism.

>I don't use frameworks, because I feel they hinder the ability to share work/prototypes with other people.

Hi buddy, I respect your opinion and encourage you to continue exploring the world of computer programming and I hope you don't feel like I'm shitting on your parade, but I feel like at this point in your quest I should draw your attention to a tool called git.

>For being an industry that fetishes productivity, it's pretty unproductive.
It's not the 1990s anymore. This industry only fetishises diversity and feminism now.

This is not about handling revisions. This is about writing code that people understand. Frameworks basically cause a vertical abstraction that's usually pretty useless.

Coastie.

I don't see why you love it. It feels like C#, except with retarded features, legacy shit, no type safety, a horrible standard library, a horrible ecosystem, worse performance and cross browser incompatibilities that force you to use legacy versions of the language or deal with horrid build tools.

>I've worked with over 20 languages

Like "I've toyed with over 20 languages, 5 minutes each" amirite?

Because both python and js are shit.

>dynamically typed, open paradigm, easy to prototype, language that doesn't enforce a rigid structure, feels like a language which heavily forces OO and a fixed way of doing things
I'm a pro C# and JavaScript developer and you are a fucking retard. Or you just have zero experience of other languages. They are nothing alike.

>I don't see why you love it. It feels like C#, except

>with retarded features,
like built in array higher order functions?

>legacy shit,
so?

>no type safety,
typescript

>a horrible standard library,
what?

>a horrible ecosystem,
NPM is fine

>worse performance and
C# runs in the browser?

>cross browser incompatibilities
just target chrome, and safari, everyone else can go fuck themselves.

JS is cool but it's only cool in the realm of the web.
It has too many shortcomings to be a good language if you remove the browser out of the picture.

It's also a bad general scripting language because it's async, making the typical script with delays and such a nightmare to get around easily, and it turns those simple things into an "effort" of handling promises or async await, you end up with simple scripts being twice the LOC of a python program doing the same thing, even if you include packages and shit...Or god forbid you use callbacks all the time and end up with a fucking nightmare.

It doesn't lend itself nicely to OOP or FP either, so there's no real reason to use it as a nice language for a specific paradigm you enjoy.

So overall it does everything very "meh", but it does actually do everything, so using it as a hobby language to just do general things in is pretty shit.

>dynamically typed
Terrible. The instances where you NEED dynamic typing are rare and if you do, you can EXPLICITLY do it in C# using the dynamic type keyword.

>open paradigm
Not even sure what you mean by that. You can do any paradigm you want in C#, too. Sure, you're forced to wrap things in classes, but that doesn't automatically make every library OOP.

>easy to prototype, language that doesn't enforce a rigid structure
Great, a language that makes it easy to create a messy and impossible to maintain program. I sure love maintaining garbage full of technical debt because it was "easy to write".

And JS's standard library is an embarassment. The one language that would truly benefit from a huge standard library so you don't have to send too many bytes down the line has a teeny tiny standard lib and forces you to trust the worst ecosystem ever instead.

Newer versions are alright, but the only place where there isn't a superior alternative is active content on websites. You might enjoy Go. It's pretty simple, uses curly brackets, and has a similar thing to async/await.

>like built in array higher order functions?
No. Like prototypes, retarded behavior like null being a type but typeof null being object, having "null" and "undefined" in the first place, incomprehensible operators (e.g. [] + {} = object, {} + [] = 0) the terrible behavior of "this" which binds on call, causing bugs for even experienced developers and the terrible, terrible browser APIs.

>NPM is fine
Sure is. Every security breach, every malware package, every package that changes maintainer and gets injected with malware makes it better.

>C# runs in the browser?
Yes. msdn.microsoft.com/en-us/magazine/mt829752.aspx

>just target chrome, and safari, everyone else can go fuck themselves.
And I'm the one being accused of having zero experience.

>muh STATIC typing
Yeah no. C# has a subpar type system, and if you're gonna have awful static typing it's better to just go with dynamic typing instead.

Come back when C# can do something as simple as a function composition operation. Because it can't meanwhile in JS it's trivial. C# tards eternally BTFO

const compose = (f, g) => x => f(g(x))

Oh look, syntactic sugar for one feature nobody ever even uses. C# eternally BTFO. Every single flaw of JS is forgiven.

Come back when you have something like LINQ. And I don't just mean functional operations on an array.

>nobody uses function composition
You're just BTFOing yourself now, bub. Sad!

>Oh look, syntactic sugar for one feature nobody ever even uses
literally for higher order functions, such as "functional operations on an array".

maybe you're looking for lodash?

Let's be serious for a moment here, I know you like to jerk over LINQ but it's really nothing special other than performance-wise. You can easily replicate everything in there yourself using JS thanks to function composition. It's mostly just list operations either way.

Performance is the one and only positive C# has over JS, and that doesn't matter in most use cases.

>Lodash is comparable to LINQ
Good lord. Buddy, pal. Enough. You're embarassing yourself.

gist.github.com/DanDiplo/30528387da41332ff22b

In what way is it not?

You obviously don't know much about LINQ. I was trying to hint towards it in my post, but you must have ignored it. Pathetic. LINQ ISN'T just functional array operations.

Have you ever wondered why it's called "Language integrated"? What benefits that would bring if "where", "map" and co can just be implemented in userland in any language?

LINQ queries are processed by user programmable providers that can parse the functions you give in your queries, not just evaluate them. This allows LINQ to query not just arrays, but also Databases - SQL or NoSQL - XML Documents and actually anything you could want by transforming your queries into SQL queries or xpath expressions or whatever you need.

You can't implement that in JS. If you have something like
.where(e => !e.ids.contains(someId)), in order to turn that into proper SQL, it's not enough to just evaluate the code. Something would need to understand that there's a negation and a call to "contains in order to generate the correct "where not in" construct. And that part needs to be included in the language.

All those "Linq for JS, PHP" etc. implementations only implement array operations, which are childs play. The true value of linq comes from the type- and refactoring safety it brings to your code and the way it greatly simplifies writing queries.

So, it's a DSL in essence. That's a nice lecture, but what's keeping me from writing the same API, an intermediate representation and several backends for SQL and any other use cases with JS?

Sure, if you want to ship 2MB down the line, have no type safety, errors at runtime, no auto completion and no support from libraries or services you didn't write and yet another language to learn and also maintain and have it compete against 5 other implementations that accomplish the same, then that's great.

Meanwhile, LINQ is fast, maintained for you, it's C# you write, type and error checked statically and, most importantly, embraced by the community, with many providers and other libraries already written that use it.

>ship 2MB down the line
You're greatly overestimating the difference
>have no type safety
C# has babby-tier type safety, if that was my goal I'd be using Haskell or Idris.
>errors at runtime
Just like C#? You know, it doesn't even have static error exception handling like Java.
>no auto completion
Who gives a flying fuck, I can type 5-character words just fine and I don't have Alzheimer's.
>no support from libraries or services
Just no support from basically anything since it's C#, event their Linux support is a joke

typescript

Cool post user, tldr: I never touched C#. I don't wanna catch the poor.

Sounds like hibernate

Doesn't really let you write queries in code, does it? You still need to use strings. Hibernate Query language is its own language.

I used to use JavaScript for hobby projects, but I gave up on it because of just how fucked up the community is.

It is a webdev language
I am not a webdev