News for hackers. Stuff that matters.
Re:Rust Koans (2015) by DougBTX on Tuesday May 21, 2019 @05:29AM (#19968682)
> there's no meaningful semantic difference

Traits can be defined for existing structs without changes to the struct definition, so there are at least practical differences.

Examples here: https://blog.theenginerd.com/blog/2015/06/27/traits-on-gener...

Re:Rust Koans (2015) by LukaD on Tuesday May 21, 2019 @05:54AM (#19968780)
Another practical difference is that you can implement multiple traits for a given struct which require a method with the same name and same/different signature. The compiler always knows which trait implementation the code is calling so the names implementations don't clash.
Re:Rust Koans (2015) by ajross on Tuesday May 21, 2019 @11:37AM (#19971133)
Not to pick on you two: but a feature that implements the same concept modulo changes to the source code like friend declarations (first example) or naming (second) is the very definition of a merely syntactic difference. Rust represents the same stuff, it just does it in funny ways. That was my point.
Re:Rust Koans (2015) by DougBTX on Thursday May 23, 2019 @02:15AM (#19988966)
Yes, I avoided the “semantic” question as it seems very slippery, it could easily devolve to “Rust is turing complete so it is just the same as any other language”.

Out of interest, do you have any examples that you would consider semantically different, while still being appropriate for day-to-day programming?