9 Nov
2016
9 Nov
'16
2:41 p.m.
On Nov 9, 2016, at 2:32 PM, Phil Mayers <p.mayers@imperial.ac.uk> wrote:
On 09/11/2016 16:30, Alan DeKok wrote:
For the second example, you have to guess that the LHS is a CIDR? Parsing random strings *correctly* is hard.
No absolutely not. Magic typing is the work of the devil. You force the author to cast an untyped LHS and bomb out if the cast fails - at compile time for constants, runtime for dynamics:
if ('10.254.0.0/16'::ipaddress contains &NAS-IP-Address)
if (&Tmp-String-0::ipaddress ...)
OT: remind me why & is now a thing in front of unlang attribute names, as opposed to defining barewords as attributes?
Because barewords were also used for enumeration values and the ambiguity was annoying. -Arran