(pointer + index)^.MyProperty := 10;
I want to allow: (pointer + index).MyProperty := 10; in this case
(issue 77290, logged for the version after the upcoming version)
what are you trying to solve with packed record, we have packed support (iirc via [Packed]), but it won’t do anything in this case, since they’re all the same size?
var x: string[30];
Not a big fan of that to be honest, it has some implications, like [0] being the length that are incompatible with Oxygene.
String is a class, it’s immutable too, so it’s more like .net’s string. If you need to change a string a lot of times, it’s better to use StringBuilder (like appending, editing), otherwise string has functions for concat/substring/delete/etc.
Honestly the reason why I like it more is because I want a difference between calling record.property and reference. Property and for that the arrow operator is actually more convenient but you are the compiler chief
In my opinion they don’t fit in a modern language. “TextFile” can be done a lot better with StreamReader or equivalent, a proper class instead of “magic”. File of would have trouble with alignment, strings (which are pointers) and cpu byte ordering. Something like this can be solved a lot better with a class that clearly states tells what it’s doing. And lastly, record files restrict a file to 1 type, can’t easily be expanded because the record format is “set” and probably should be discouraged in the first place.
That all said, there’s nothing to stop anyone from writing two classes that do this that mostly match the semantics.
And btw, it may happen that sometimes i’m asking some unnessecary questions or stupid ones, because im not in a developer level like you guys^^ and im still learning a lot, pls put that in mind when reading some issues i’ve posted
I found another feature, are you able to create the same tuples as in C# 7.0
where they are named tuples, like: (Name: string, ID: int32, haveLoan: boolean)
and in Oxygene:
var myyTuple: tuple of (Name: string, ID: int32, haveLoan: boolean);´
myTuple.ID, myTuple.Name, myTuple.haveLoand //and so on...
would be really nice, because you wouldnt have to create really often records, which are actually not more than what i explained before
PS:
Why are your tuples classes and not records, they actually behave more like a struct/record?