Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: syswrite numbers, not strings

by akujbida (Acolyte)
on Dec 18, 2014 at 11:54 UTC ( [id://1110740]=note: print w/replies, xml ) Need Help??


in reply to Re: syswrite numbers, not strings
in thread syswrite numbers, not strings

Perhaps I just like variables to be firmly typed, so I can stand on them without wobbling. Bizarreness is defined by point of view, so we can certainly have different bizarres. I don't think I said anything to imply that a special case need exist. I like your print 0x65 example.

Replies are listed 'Best First'.
Re^3: syswrite numbers, not strings
by RonW (Parson) on Dec 18, 2014 at 23:01 UTC

    While you could try using a module like Variable::Strongly::Typed, it probably would be of little help. As best I can tell, Variable::Strongly::Typed, only prevents you from assigning the wrong type of value to variables. It does not try to prevent implicit stringification of numbers nor numification of strings. Also, the documentation implies it uses a regex to determine if a value is a number.

    There is also typesafety, but the documentation says it's for objects, so it may also be of little help.

    Also, there is PerlGP, which claims to provide strong typing. Never heard of it before now, so I don't know just what it provides.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1110740]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2024-04-26 06:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found