Hacker News new | ask | show | jobs
by comrade1234 354 days ago
JavaScript used to be a nice prototype based programming language...

Anyway, I'm more interested in how this site is being published. I'm on iOS and in vertical format words are cutoff with dashes properly for that format and when I switch to landscape other words are cut off that fit that format.

Is this some simple css attribute I missed completely?

3 comments

> JavaScript used to be a nice prototype based programming language

"this" binding depending on the call site never made sense to me. Why do you think it became worse with arrow functions and Function.prototype.bind?

In case I'm not misunderstanding you. Tbh I haven't read the article so I'm only responding to your first sentence, since the CSS hyphens thing has been cleared up already.

By the way, CSS hyphens have been my most-wanted feature ever when I was working for a web design agency. So glad to see it gain traction over the years.

There are JS libraries for this, and of course they cause ugly page reflow and/or overhead.

Prime example of what should be in the CSS domain, and such a frequent problem when putting real content into design templates.

I totally missed that. :) as long as the browser has a hyphenation dictionary for the language being used it will work.
To be fair, most of these complaints about functions in JS are because its roots are still a nice prototype-based programming language and the `class` syntax sugar implies class-oriented things that JS doesn't deliver and confuses prototype-oriented features as class-oriented bugs. You can still use them as features, though we are getting close to the point where using them as features is an art form for arcane wizards that will make many, many JS users scream in terror and confusion.