Re: New built-ins (`?whatever` things)... any opinions/ideas?

[email protected]
Newsgroups gmane.comp.web.freemarker.devel
Message-ID <[email protected]>
> All right, with Daniel that makes two votes for choose.
>
> clicked?choose("show","hide")

Ok, so if nobody says nothing more, it will be "choose".

Yes this is fine.

-- Denis.

> My suggestion was clicked?either("show","hide")
> Another choice would be then
>
> clicked?then("show","hide")
>
> It would be nicer with an else.

Without the "else" it's no better than "choose" IMO.

> We could use a default value. Then it would be between:
>
> clicked?choose("show","")
> clicked?choose("show","hide")
>
> clicked?then("show")!
> clicked?then("show")!"hide"

Too smart... means, it certainly confuses the average user. The more
exact problem is that someday FreeMarker will support `null` (I hope).
So you can assign null to a variable, and throw around null-s in
general. Then this `choose` thing has to allow a null result when the
condition was true, in which case the above `!` trick fails.

> Just throwing some ideas...
>
> -- Denis.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________
FreeMarker-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.