Better HN
topnewbestaskshowjobs
Log inSign up

Parsyval

59 karma · joined Jan 25, 2018 (8y ago) · 10 submissions

Submissions

1.

Code = Language(medium.com ↗)

1 points · by Parsyval · 8y ago · discuss

comment 8y ago · link · parent

Well writing code is much simplier this, but devs that are familiar with 'classical' OOP languages will do a lot of mistakes because of what is in the article.

comment 8y ago · link · parent

Since I work with Typescript, I do the same with the TS playground, it's really usefull to learn that kind of stuff.

4.

JavaScript: prototype vs. class(medium.com ↗)

69 points · by Parsyval · 8y ago · 55 comments

comment 8y ago · link · parent

'proper classes' no 'class' keyword syntaxical sugar, behind it's all prototypal. Please understand that if you are doing JS.

comment 8y ago · link · parent

Of course, you are right when you say "Once you create an instance of something [...] code will be created". But what I am pointing here is BEFORE you create any instance of anything.

You define a contract, what your object should look like. With an interface it's checked before runtime and then translates to no code. But using a class, you have code generated for the runtime.

comment 8y ago · link · parent

Thanks for this input, I'll see about that.

comment 8y ago · link · parent

"interfaces don't have a runtime representation" I was looking for a good way to say that while writing the article, this is a very good way ! Thanks Also I like that you think about the use of instanceof, I didn't really think of that, but some devs use this condition intensively.

9.

Typescript: class vs. interface(medium.com ↗)

49 points · by Parsyval · 8y ago · 33 comments

10.

I wrote my second article on an angular matter(medium.com ↗)

1 points · by Parsyval · 8y ago · discuss