Live data from Hacker News

RFC: Adopt a modern JavaScript framework for use with MediaWiki

phabricator.wikimedia.org

271–280 of 293 posts

Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki

#271
post #79

Earlier quoted context omitted.

I'm not a myth. Some of us started JS programming over a decade ago, with no strong typing and IDE to hold our hand and tell us every time you make a mistake. The key is just discipline, good design patterns and a good linter. I see TypesScript as a VERY opinionated linter that affects how you think and write JS. JS is a dynamically typed language, which means you loose a lot of its power and flexability by shoe-horn…

>no strong typing and IDE to hold our hand and tell us every time you make a mistake Ha ha! You remind me of Larry Wall: https://news.ycombinator.com/item?id=22210073 >"I think IDEs make language developers lazy." -Larry Wall https://www.youtube.com/watch?v=AO43p2Wqc08 To which James Gosling replied: >"IDEs let me get a lot more done a lot faster. I mean I'm not -- I -- I -- I -- I -- I'm really not into proving my m…

I think what Andrew Hejlsberg himself, the designer of C# and TypeScript, said speaks to the claims orange8 is making about TypeScript being a "VERY opinionated linter" and that "you loose a lot of its power and flexability by shoe-horning it into strongly typed languange patterns".

Andrew Hejlsberg's point is that TypeScript is a "multi-paradigm" language: it's not just strongly typed, but also structurally typed, interface based, plus everything else JavaScript itself is: dynamically typed, duck typed, functional, imperative, event driven, class based, prototype based, object oriented, etc.

Even the term "object oriented" has a broad spectrum of independent meanings: JavaScript has many but not all of the a la carte menu of features or properties of "object orientation" that Jonathan Rees listed in response to Paul Graham's essay "Why Arc isn't Especially Object-Oriented".

http://paulgraham.com/reesoo.html

http://mumble.net/~jar/articles/oo.html

http://paulgraham.com/noop.html

Andrew Hejlsberg said:

>I think it's wrong to talk about "Oh, I only like object oriented programming languages, or I only like imperative programming, or functional programming".

It's a mistake to think that TypeScript restricts you to just one way of programming, and you have to give up the ways you used to program JavaScript. TypeScript ADDS to the number of ways you can program JavaScript. It's a superset of the multiple programming paradigms that JavaScript supports.

You don't "loose a lot of its power and flexability by shoe-horning it into strongly typed languange patterns" -- quite the opposite, you don't "lose" anything: you actually gain more "flexibility" and more "language" patterns.

Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki

#272
Developer experience in React is orders of magnitude better than in Vue. Also, the React community settles on great conventions and patterns to help you be really productive early on. This is great because you end up with projects that are a pleasure to code in and easy to maintain. Debugging experience is far superior in React, finding the root cause of an issue is much quicker than with vuejs. Working in a vuejs project, I continuously wish we could just abandon it and rewrite everything in React.

Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki

#273

Team lead of Vue.js here. Clarifying a few points being raised in this thread: - This does not mean Wikipedia is becoming an SPA. One of the reasons they picked Vue is because Vue can be used to progressively enhance a statically rendered page (just like jQuery, but with a declarative development paradigm), and it allows you to do so without a build step (while keeping the going-full-build-step option open). - Wikime…

> One of the reasons they picked Vue is because (...) it allows you to do so without a build step

I think it's great that Vue is capable without a build step; however, this implies one restriction, which is that you must have all the components loaded before the application starts. And Async components don't help here because you would have to mantain a list of components names, which without a build step become cumbersome.

I would like that my proposal for lazy loading components (https://github.com/vuejs/vue/pull/8807) would be accepted, then we would have the ability to load components on demand without a build step.

Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki

#274

Earlier quoted context omitted.

\s or /s Dont care. Small minds, small arguments. Atleast you're consistent that way

It's kind of funny how you boast that you don't want any hand holding from the compiler or IDE, yet you proudly proclaim and demonstrate that you're careless about syntax, spelling, and punctuation. And how you sarcastically complain about immature thoughtless responses, yet you're insulting and patronizing. ;) At least you're consistently self contradictory.

LOL!! |s

Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki

#275

Earlier quoted context omitted.

>> Then you have interfaces. Not really. My definition of a language feature is something the compiler supports and checks for. JS does not have interfaces. What you're talking about are patterns and best practices, so you're getting there... JS is a dynamic language. Just deal with it already... you sound smart enough to support both paradigms at the same time in your head.

> Not really. My definition of a language feature is something the compiler supports and checks for. JS does not have interfaces. It doesn't matter what your definition of a language feature is. The person you responded to was obviously talking about interfaces in the general sense of the word and was asking a question about it. > What you're talking about are patterns and best practices, so you're getting there... N…

> It doesn't matter what your definition of a language feature is. The person you responded to was obviously talking about interfaces in the general sense of the word and was asking a question about it.

Really? So now this has devolved into a debate about semantics? I thought this was about JS and TS, not the "general meaning of interfaces". Using that way of thinking, even HTML and CSS have interfaces. Arguing over semantics is a very common tactic by the way, if you just want to win a debate for arguments sake. Let us keep it specific. My point is JS, as a functional language does not have or even require many of the features and constructs of a strongly typed OOP language, interfaces being a good example. The inverse also applies.

Different programming paradigms = different patterns and best practices

>>Nope, what I'm talking about is interfaces. The nature of function signatures as interface points is not a matter of patterns and best practices. They simply are exactly that, whether it's spelled out for you or not.

Are you saying an interface is a function signature and is this what you mean by interfaces in general?

>>This doesn't constitute an argument or an objection to anything I've said. It presumes that I won't "deal with it" when there is no evidence that I'm not. It supposes that "support[ing] both paradigms at the same time", whatever that means, is a matter of my intelligence. It doesn't argue for any of this.

My responses do not have to be blow by blow objections to every single point you make. This is a discussion, not a computer program. And I stand by the sentiment: for optimal results, think functional when working in a functional language.

Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki

#276
post #261

Earlier quoted context omitted.

> javascript is just typescript with documentation stripped off. JS, at its core is a dynamically typed, functional language. Typescript aims to model a strongly typed, OPP language. The two programming paradigms have their own strengths, weaknesses and most importantly: patterns and best practices . If the only difference between your pure javascript code and your typescript code is the annotations, you are doing it…

It's not very strongly typed at all, and it absolutely doesn't force you into the OOP paradigm. Why don't I consider it strongly typed?: Structurally subtyped as opposed to nominal typing, the pervasiveness of any, allowance for vanilla JS coercion, exceptions and promise rejections are untyped, etc.

I agree, that's why I said TS aims to model a strongly typed languange.

Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki

#277
post #248

Earlier quoted context omitted.

> javascript is just typescript with documentation stripped off. JS, at its core is a dynamically typed, functional language. Typescript aims to model a strongly typed, OPP language. The two programming paradigms have their own strengths, weaknesses and most importantly: patterns and best practices . If the only difference between your pure javascript code and your typescript code is the annotations, you are doing it…

> Typescript aims to model a strongly typed, OPP language That's a rather puzzling statement, to be honest. Strong type system is explicitly one of the non-goals[0]. I write typescript code everyday and most of it is functional. Things like fp-ts[1] make it even more enjoyable. [0] https://github.com/Microsoft/TypeScript/wiki/TypeScript-Desi... [1] https://github.com/gcanti/fp-ts

Am comfortable using both OOP and functional styles, though I do enjoy the flexibility and terseness that can be produced from the functional approach.

What I meant by the comment is that when using TS, I just find it more easy and natural to go with the proper OOP approach. I think the very existence of a separate library to enable a more functional style in TS proves this goal has not been met yet.

Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki

#278

Earlier quoted context omitted.

It's kind of funny how you boast that you don't want any hand holding from the compiler or IDE, yet you proudly proclaim and demonstrate that you're careless about syntax, spelling, and punctuation. And how you sarcastically complain about immature thoughtless responses, yet you're insulting and patronizing. ;) At least you're consistently self contradictory.

LOL!! |s

Are you now clear on what Andrew Hejlsberg, the designer of TypeScript and C#, meant by "multi-paradigm" languages?

>I do think one of the things that is luckily happening is that, like as Larry says, everyone's borrowing from everyone, languages are becoming more multi-paradigm.

>I think it's wrong to talk about "Oh, I only like object oriented programming languages, or I only like imperative programming, or functional programming".

Look at the nice table:

https://en.wikipedia.org/wiki/Comparison_of_multi-paradigm_p...

Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki

#279
post #79

Earlier quoted context omitted.

I'm not a myth. Some of us started JS programming over a decade ago, with no strong typing and IDE to hold our hand and tell us every time you make a mistake. The key is just discipline, good design patterns and a good linter. I see TypesScript as a VERY opinionated linter that affects how you think and write JS. JS is a dynamically typed language, which means you loose a lot of its power and flexability by shoe-horn…

>Some of us started JS programming over a decade ago, with no strong typing and IDE to hold our hand and tell us every time you make a mistake. The key is just discipline, good design patterns and a good linter. A decade ago isn't very long ago. JavaScript is more than 24 years old, and we had to get along without good design patterns or good linters or good debuggers or good libraries or good documentation or good I…

I may have shaved a few years here and there to calculate that decade ;)

I'm still waiting for a browser to come with an inbuilt server like netscaape 3.

Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki

#280

Earlier quoted context omitted.

>no strong typing and IDE to hold our hand and tell us every time you make a mistake Ha ha! You remind me of Larry Wall: https://news.ycombinator.com/item?id=22210073 >"I think IDEs make language developers lazy." -Larry Wall https://www.youtube.com/watch?v=AO43p2Wqc08 To which James Gosling replied: >"IDEs let me get a lot more done a lot faster. I mean I'm not -- I -- I -- I -- I -- I'm really not into proving my m…

I think what Andrew Hejlsberg himself, the designer of C# and TypeScript, said speaks to the claims orange8 is making about TypeScript being a "VERY opinionated linter" and that "you loose a lot of its power and flexability by shoe-horning it into strongly typed languange patterns". Andrew Hejlsberg's point is that TypeScript is a "multi-paradigm" language: it's not just strongly typed, but also structurally typed, i…

>> you don't "lose" anything: you actually gain more "flexibility" and more "language" patterns.

You do not need TS to use OOP language patterns in JS. Remember TS is compiled down to JS, so all that flexibility comes from JS. The same flexibility that makes the concept of TS and the 100 other "compile to JS" languages possible. Some of that flexibility is lost because you let the TS compiler make some decisions for you as it generates the JS output.

Post reply on HN