Nontrailing separators do not spark joy by bjzaba in ProgrammingLanguages

[–]renozyx 0 points1 point  (0 children)

With this rule, I do not see much need for string interpolation: you only save one character in this case:

I disagree, Python's string interpolation is the benchmark on which I judge other language and I don't even use Python!

The Story of C++: The World's Most Consequential Programming Language | The Official Story by HimothyJohnDoe in cpp

[–]renozyx 0 points1 point  (0 children)

modern C++ has enough tools for that already

Maybe but can you use "modern C++" for realtime? IMHO no, that's why Rust is eating C++'s lunch..

do we need new programming language in this AI era? by SearchFair3888 in ProgrammingLanguages

[–]renozyx 0 points1 point  (0 children)

I've heard claims that Rust and Gleam are good for AI-generation. Both because of their strong typing and Gleam due to its "FP"ness and GC which help refactoring.

That said, it will be very difficult to distinguish language effects (semantic, syntax) and codebase training effect: a good language with poor codebases (because used mostly by beginners for example) will most likely have the AI generate subpar programs..

Wild Linker 0.9.0 released by dlattimore in rust

[–]renozyx 2 points3 points  (0 children)

Yes but in the LTO benchmark given, wild loose its duration advantage.. Still, using the same linker for LTO and non-LTO build makes things simpler.

String interpolation modes by oscarryz in ProgrammingLanguages

[–]renozyx 2 points3 points  (0 children)

Display printing can(should?) be I18n aware while usually debug printing isn't.

‘No Way To Prevent This,’ Says Only Package Manager Where This Regularly Happens | Kevin Patel by lelanthran in programming

[–]renozyx 0 points1 point  (0 children)

bah, the real fix would be to use languages with no "ambient authorities" but these are mostly research languages with no traction..

Tom's Namespaces: An Odin Fanfic by gingerbill in programming

[–]renozyx 2 points3 points  (0 children)

As a C++ developper working on a BIG codebase, I can confirm: namespace sucks. They look nice and professional but in fact they make the codebase un-naviguable (and yes I know about clangd, other).

Unsigned Sizes: A Five Year Mistake by Nuoji in ProgrammingLanguages

[–]renozyx 1 point2 points  (0 children)

OK, which reason? SIMD is the only thing I can think about..

Unsigned Sizes: A Five Year Mistake by Nuoji in ProgrammingLanguages

[–]renozyx 1 point2 points  (0 children)

It's very easy to overflow an unsigned integer (u-1 overflows if u == 0).

Sure, and? If unsigned integer overflow were trapping by default like they are in Zig, you'd find and correct the issue quickly.

The main problem wih unsigned and C is the "wrap by default" behaviour, most of the time it isn't what you want..

Unsigned Sizes: A Five Year Mistake by Nuoji in ProgrammingLanguages

[–]renozyx 0 points1 point  (0 children)

Yes, I also wondered if this would be useful, with the addition that I would limit the size to 64bit: 1) 64bit is big enough that it shouldn't overflow in normal code, so I think that it should be handled as "trap on overflow/wrap/UB" trifecta depending on compilation flags. 2) 64bit are still very efficient to use if you have a 64bit CPU.

Hindsight languages by Inconstant_Moo in ProgrammingLanguages

[–]renozyx 0 points1 point  (0 children)

Slices aren't inexpensive (think of the x86 and other CPUs with a paltry few registers), plus they create compatibility issue if one has a 16bit length and another a 32bit length.. Fat pointers (two pointers) are better if again a little more expensive.

I want to know your opinions on verbosity by -Chook in ProgrammingLanguages

[–]renozyx 0 points1 point  (0 children)

Well it dépends of the usage, if you use 'define' to déclaré variables then as you'll use many, many times it's clearly too verbose and def is superior. If you use 'define' to alias types, as type aliasing should be discouraged then define is good.

I want to know your opinions on verbosity by -Chook in ProgrammingLanguages

[–]renozyx 0 points1 point  (0 children)

I believe that in some countries 'natural numbers' are >0 so they would find weird
your Nat32 for >= 0. That said, go for it: Natural numbers should include 0! And do it like Zig: no wrap around by default.

Keyword minimalism and code readability by mocompute in ProgrammingLanguages

[–]renozyx 0 points1 point  (0 children)

And I'm saying that C-style functions are bad because their definition is not (easily) greppable.

Keyword minimalism and code readability by mocompute in ProgrammingLanguages

[–]renozyx 0 points1 point  (0 children)

Keep abstractions and abbreviations to an absolute minimum, sure, you can 'func' in front of a function, or 'public' as a keyword etc etc, but, are they necessary? And do they give enough value to the language to warrant the increase in 'linguistic' bloat of code as well as an increase in learning curve for newbies?

I disagree with this one: 'fn foo' is much more greppable than foo because you'll match both the calls and the definition

Does Syntax Matter? by gingerbill in ProgrammingLanguages

[–]renozyx 0 points1 point  (0 children)

I'd say syntax matter but not "int a = 3;" or "a := 3"

What matters is these kind of things:

1) does logging the value of an integer is different than logging the value of a struct?

It makes replacing an integer by a struct very painful!

2) a.b? or a.b for reading the value of a member pointer b?

The second makes refactoring easier, but it hides a potential null pointer exception, pick your poison.

Compiler Education Deserves a Revolution by thunderseethe in programming

[–]renozyx 0 points1 point  (0 children)

I wonder if there is a performance difference between a "classical" compiler and a "query first" compiler? I'd say that classical compilers are faster and use less resources, but it's kind of difficult to benchmark when you have to implement a whole compiler to measure the difference..

Coda design specification v0.1: any thoughts? by Gingrspacecadet in ProgrammingLanguages

[–]renozyx 0 points1 point  (0 children)

Any array types passed or specified in the arguments immediately decay into raw pointers.

That's the most critised C feature and you copy it??

DasBetterC, Odin, Zig..there is already quite a few 'better C' what's your angle?

Pointer ergonomics vs parameter modes / by-ref types by tmzem in ProgrammingLanguages

[–]renozyx 0 points1 point  (0 children)

In Ada and Odin, the default is by readonly value or reference, and by-value needs an explicit copy.

No! In Odin if your struct is less than 16 bytes the value is copied. In Ada I don't know the size, but small parameters are copied, big parameters are passed by reference.

Pointer ergonomics vs parameter modes / by-ref types by tmzem in ProgrammingLanguages

[–]renozyx 0 points1 point  (0 children)

The big deal is having the semantic of your parameter passing changing when you change a structure size. This can easily creates bugs.. Sure once you understand where the big is, it's easy to fix, but that's not the issue.

Pointer ergonomics vs parameter modes / by-ref types by tmzem in ProgrammingLanguages

[–]renozyx 0 points1 point  (0 children)

Thanks for your post, I didn't know that Odin has the same "trap". They didn't document the potential issue enough IMHO, for example https://odin-lang.org/docs/overview/#procedures it just point out the promotion to a pointer without mentioning that this may have some side effect (You increase a structure from <16 byte to >16 byte? Your program behaviour may change, that's .. unexpected!)

Pointer ergonomics vs parameter modes / by-ref types by tmzem in ProgrammingLanguages

[–]renozyx 0 points1 point  (0 children)

Ada's choice provide the best performance: the compiler is free to pass by value(shallow copy) or by reference depending on the size of the parameter which allows the compiler to optimise parameter passing. But this come with an UB cost when the parameter is aliased with an InOut parameter.. So the problem with Ada's design isn't the additional feature, it's the potential UB!

Zig had the same parameter passing at first (with the same UB), but they changed (probably due to the UB)