Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!bfmny0!tneff From: tneff@bfmny0.BFM.COM (Tom Neff) Newsgroups: comp.lang.perl Subject: Structures in Perl Summary: give us a real enum instead Message-ID: <15886@bfmny0.BFM.COM> Date: 26 Sep 90 09:27:29 GMT Reply-To: tneff@bfmny0.BFM.COM (Tom Neff) Lines: 30 Instead of implementing structures in Perl, let's add a real enum() to replace the various "enum.pl" packages. And make the dollar sign optional for enum variable definitions. Thus enum(red=100,blue,green,yellow,orange) then $mycolor=$blue; Make the native enum() mark its variables read-only until the next reset() call. Force them to be longs only. Optimize self defining values at compile time if possible. That way Perl would effectively already have structures. enum(fname,ftype,fdate,fsize,fflags); $FCB[fname] = "myfile.tmp"; $FCB[ftype] = 3; Note that making the dollar signs optional in subscript references might help readability too. system("echo Randal please send me a new JAPH | rmail merlyn@iwarp.intel.com"); -- "It has come to my attention that there is more !!! Tom Neff than one Jeffrey Miller." -- Jeffrey Miller ! ! tneff@bfmny0.BFM.COM