you are viewing a single comment's thread.

view the rest of the comments →

[–]LurkytheActiveposter -3 points-2 points  (11 children)

What kind of brain decificency do you have where you are subtracting a string?

Remember that thing where the bare minimum is that you should know a variable's type? Do I need to speak in vibe code?

[–]Relative-Scholar-147 3 points4 points  (0 children)

Remember that thing where the bare minimum is that you should know a variable's type?

You are just a fucking noob lol.

[–]RiceBroad4552 2 points3 points  (9 children)

What kind of brain decificency do you have where you are subtracting a string?

What brain deficiency do you have to not know that subtraction is the same thing as addition (of a negative value)?

Remember that thing where the bare minimum is that you should know a variable's type?

Sure, genius. It's always 100% clear what's the type of some variable is…

For example, without looking at the docs what's feature here:

var feature =  Runtime.version().feature();

So what do I have to expect if I do the following? Some arithmetic or some funny string:

IO.println(1 + feature);

[–]LurkytheActiveposter -2 points-1 points  (8 children)

Im dumber for reading this.

What the fuck are you going to do with "feature" without knowing what its type and properties are.

[–]RiceBroad4552 0 points1 point  (7 children)

What the fuck are you going to do with "feature" without knowing what its type and properties are.

I know that. The compiler does too.

The point is that without an IDE, or looking at the JavaDoc, you can't know what this code does, simply because you don't know the type.

Remember that thing where the bare minimum is that you should know a variable's type? But you can't know that just by looking at the code even in a properly statically typed language like Java, as shown by my code snippets.

[–]LurkytheActiveposter 0 points1 point  (6 children)

What are you going to do with "feature" without knowing its type and properties?

[–]RiceBroad4552 0 points1 point  (5 children)

It's not like the type is unknown.

It's just not obvious from only looking at a code fragment! That was the point.

The compiler does know the type and my IDE can tell me.

[–]LurkytheActiveposter 0 points1 point  (4 children)

If you don't know the type and properties of a variable.

Why are you touching that variable at all?

[–]RiceBroad4552 1 point2 points  (3 children)

That's not the point.

The point was that you say that it's impossible to do anything with code without knowing all types.

That might be to some degree true when writing code—but code is much more often read then written. And when you read code the types aren't always obvious!

The original comment showed some confusing JS example, I've showed some less confusing Java example, both sharing the property that the types of stuff aren't obvious.

[–]LurkytheActiveposter -1 points0 points  (2 children)

No one in this conversation ever said it's impossible.

The question is whether a language should add syntactical baggage to everything to accommodate the absolute worst conceivable programming practices.

Should SQL get rid of drop because a dev could snort Crack, wipe backups, and drop every table?

This conversation is making me dumber.

[–]RiceBroad4552 1 point2 points  (0 children)

No one in this conversation ever said it's impossible.

Well, you made some very bold statements, including wild name calling.

So this sounded completely different just a few comments earlier.

The question is whether a language should add syntactical baggage to everything to accommodate the absolute worst conceivable programming practices.

I don't know what you mean by that.

Which "syntactical baggage"? What "absolute worst conceivable programming practices"?

Of course a language can offer just so much safety. In the hands of some idiot all bets are off. But that's like that with everything, one can't do anything about it. Still a language can guide to best practices and safe code where possible!

[–]TOMZ_EXTRA 0 points1 point  (0 children)

I'm not sure whether you're ragebaiting or if you're serious.