[ http://dev.sourcefabric.org/browse/LS-595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19049#action_19049 ]
David Baelde commented on LS-595: --------------------------------- This isn't a bug but a long-known limitation, because we don't have exceptions. For example, list.hd() can't issue an error when the list is empty, so it returns a default element, the empty string. Coming up with default elements for arbitrary types would be more complex and probably unmanageable for users. We should close this ticket, or rename it to "add exceptions to the language". > Too constrained types for list operations > ----------------------------------------- > > Key: LS-595 > URL: http://dev.sourcefabric.org/browse/LS-595 > Project: Liquidsoap > Issue Type: Bug > Reporter: Samuel Mimram > Priority: Critical > > Some of the generic functions operating on lists are restricted to lists of > strings. For instance: > _[_] : (string,[(string*string)])->string > list.assoc : (string,[(string*string)])->string > list.hd : ([string])->string > etc. > For the two first, this might just be that association lists should be > generalized to be able to contain any elements indexed by strings. But > list.hd is clearly a bug. > Notice that this is not the case for all functions operating on lists for > instance: > list.length : (['a])->int > list.tl : (['a])->['a] -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://dev.sourcefabric.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Get your Android app more play: Bring it to the BlackBerry PlayBook in minutes. BlackBerry App World™ now supports Android™ Apps for the BlackBerry® PlayBook™. Discover just how easy and simple it is! http://p.sf.net/sfu/android-dev2dev _______________________________________________ Savonet-devl mailing list Savonet-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/savonet-devl