You are viewing a single thread.
View all comments
22 points

I’ve been programming in typescript recently, and can I say. I fucking hate JavaScript and typescript. It’s such a pain so much odd behaviors.

permalink
report
reply
20 points

I like custom types and them being able to follow custom interfaces; it makes for great type safety that almost no other language can guarantee!

What I’m saying is I’m learning Rust.

permalink
report
parent
reply
4 points

Exactly

permalink
report
parent
reply
-3 points

Lol name one outside of it’s well known equality rules that linters check for.

Also, name the language you think is better.

Because for those of us who have coded in languages that are actually bad, hearing people complain about triple equals signs for the millionth time seems pretty lame.

permalink
report
parent
reply
5 points

Recently I encountered an issue with “casting”. I had a class “foo” and a class “bar” that extended class foo. I made a list of class “foo” and added “bar” objects to the list. But when I tried use objects from “foo” list and cast them to bar and attempted to use a “bar” member function I got a runtime error saying it didn’t exists maybe this was user error but it doesn’t align with what I come to expect from languages.

I just feel like instead of slapping some silly abstraction on a language we should actually work on integrating a proper type safe language in its stead.

permalink
report
parent
reply
1 point
*

I think that might be user error as I can’t recreate that:

permalink
report
parent
reply

@masterspace “Undeclared variable” is a runtime error.

Perl.

permalink
report
parent
reply
1 point
*

A) yes, that’s how interpreted languages work.

B) the very simple, long established way to avoid it, is to configure your linter:

https://eslint.org/docs/latest/rules/no-undef

I haven’t used Perl though, what do you like better about it?

permalink
report
parent
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 4.3K

    Monthly active users

  • 943

    Posts

  • 10K

    Comments

Community moderators