Logo

Programming-Idioms

History of Idiom 5 > diff from v6 to v7

Edit summary for version 7 by :

Version 6

2015-08-21, 09:02:11

Version 7

2015-08-21, 11:28:52

Idiom #5 Create a 2D Point data structure

Declare a container type for two floating-point numbers x and y

Idiom #5 Create a 2D Point data structure

Declare a container type for two floating-point numbers x and y

Code
my $point = { x=>1.5, y=>6.3 };
Comments bubble
In a hash, members are named.

No need to declare a type beforehand.