On Wed, May 22, 2013 at 9:31 PM, Dan Douglas <[email protected]> wrote:
> On Tue, May 21, 2013 at 3:51 AM, Roland Mainz <[email protected]> 
> wrote:
>> Hi!
>>
>> ----
>>
>> Attached (as "astksh20130503_typeset_copy_operator001.diff.txt") is a
>> small patch which provides a type-independent copy-by-name operator.
>
> Why are typeset options required to move/copy objects?

typeset -m destname=srcname # move/rename variable
typeset -c destname=srcname # copy variable

> Don't namerefs
> on positional parameters create reference variables (`&arg'/`ref arg'
> from C++/C#) that refer directly to an object right?

I don't grok this. Can you give an example, please?

> If not ksh should
> really have an explicit dereference operator instead.

ksh93 has a dereference operator: ${!varname} returns the name a
nameref is referring to.

> `typeset -c' conflicts with Bash's (undocumented) "capcase" feature.

1. Its undocumented in bash(1). It never was and AFAIK never will be
because it was an experiment
2. I can't find any scripts which use this feature, and in the light
of ksh93's typeset -M it is redundant
3. Its not working properly outside ASCII (you can verify that the
generated multibyte characters are garbage through AST wc -X)
4. ksh93 is not bash
5. typeset -m and typeset -c is much more useful than another damn
make characters uppercase feature which can be implemented much easier
through typeset -M, disciplines or other means

> Also ksh fails on most of your examples if wrapped in a namespace.

Yes, I noticed a few bugs. But if you follow the
[email protected] closely you'll see that Roland is
reporting bugs as they are found and per Roland's feedback on my own
bug reports David Korn is fixing them for the next ast-ksh alpha. So
no worries :)

Irek
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to