Monday, July 8, 2024

Odin Programming & array programming

 At their site or in the manual we can read array programming which is something is heavly used in PHP. Think one of the best things to use.

Din't have much time to study this but so far looks cool.

We have width this language extensive  suporting it...

Construct an array with designated initializers:

from : https://odin-lang.org/docs/overview/#fixed-arrays

We can see 2 new features to C lang and i think low level in general :


Assign by index and ranges. Ranges is something new to me having the same value populate several fields it may be helpfull in manipulating large fields of data like in Journals for example.

More info check the link manual... "Something in developing..."

favorite_animals := [?]string{
	// Assign by index
	0 = "Raven",
	1 = "Zebra",
	2 = "Spider",
	// Assign by range of indices
	3..=5 = "Frog",
	6..<8 = "Cat"
}

No comments:

Post a Comment

hi

Odin Programming & array programming

 At their site or in the manual we can read array programming which is something is heavly used in PHP. Think one of the best things to use....