ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl6-internals
perl6-internals
Re: String API
by Dan Sugalski other posts by this author
Aug 24 2003 7:04PM messages near this date
Re: String API | Re: String API
At 12:07 AM -0400 8/19/03, Benjamin Goldberg wrote:
> There are a number of shortcomings in the API, which I'd like to address

> here, and propose improvments for.


You're conflating language level strings with low-level strings. Don't.

STRINGs, the parrot structure and what S registers point to, are 
single-encoding, single-character set entities. They're designed for 
as fast access as feasable while maintaining the bare minimum of 
language/set/encoding abstraction. Parts of the core *will* assume 
they are concrete and, once transformed into a fixed-width format, 
can be accessed directly while avoiding all the overhead of the 
encoding (and even character set) functions.

PMCs are full-blown language level variables that can do whatever the 
heck they want when accessed. Everything you do can be mediated by C, 
Parrot, or perl/python/ruby/scheme/forth/BASIC/whatever code. Lazy 
strings, multi-encoding strings, tree structures with strin reps, 
whiatever.

Most, nearly all, high-level language level functionality should use 
PMCs. If a STRING is insufficiently flexible for what you want, 
that's a sign you shouldn't use it.
-- 
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@[...].org                         have teddy bears and even
                                       teddy bears get drunk


Thread:
Benjamin Goldberg
Benjamin Goldberg
Dan Sugalski
Benjamin Goldberg
Benjamin Goldberg
Benjamin Goldberg
Gordon Henriksen
Gordon Henriksen
Leopold Toetsch
Dan Sugalski
Benjamin Goldberg
Nicholas Clark
Peter Gibbs
Dan Sugalski
Leopold Toetsch
Benjamin Goldberg
Nicholas Clark
Elizabeth Mattijsen
Dan Sugalski
Benjamin Goldberg
Benjamin Goldberg
Leopold Toetsch
Benjamin Goldberg
Tim Bunce
Leopold Toetsch
Luke Palmer

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved