[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Re: string formatting notation



> On 24 Dec 2017, at 23:13, <brianlheim@xxxxxxxxx> <brianlheim@xxxxxxxxx> wrote:
> 
> Scott, I'm sorry that my prior comments were not as impartial as they should have been.
> 
> On the other hand, through this discussion I've had to ignore comments like 
> 
> > There’s way too many duplicate methods in SC added to support personal preference of developers.
> 
> > SC is already full of syntax variants which people added only because it was like their favourite language.
> 
> > Don’t think about how it feels to you, think about the effect it has on the language, users and general case.
> 
> Which are very obvious and unfair assumptions about my motivations.

Well, I’m trying to tell a cautionary tale here, not accuse you of anything. That’s why I was very careful not to use the word you in the first two. In the last one I did, but it was in direct response to your saying that you didn’t like the way something feels.

Because of the nature of SC and its user base, I think members of the developer community, who tend to have rather exceptional backgrounds and use patterns by SC standards, sometimes make poor model users. This is easy to miss, and I think makes it at least a little different than something like Python. (Though I agree with you that Python is in many ways well designed; it’s relative lack of duplication being a good example.)

Also, as far as I’m concerned, there’s nothing wrong at all with wanting to contribute something because it would be personally useful! Many, probably most, contributors start from this. But the big picture is hard to see as an individual, so sometimes I think it’s good to speak up.

> This puts me in the position of having to defend both my idea and my "virtue", which is perhaps why my frustration came out a bit in the last message.

No worries, and sorry if my old greybeard exhortations came off the wrong way.

Anyway, I don’t see why we can’t have straightforward notation, and keep things simple for the common case. All I’m really pushing for is that we do our best to make things as frictionless as possible. I recognise there’s no easy fit in this case. FWIW, I suggested the InterpString”…” idea as it’s like existing constructor conventions.

[  ] indicates a collection, an Array by default.
Set[ ] tells us this is to be a Set instead.

by analogy

“…” is a String
InterpString”…” is a an interpolated string instead. (Name can be shorter, I’d just prefer more meaningful then ‘f’, especially as we’re saying this is not formatting)

So, not a new function call (Note the capital.)

Problem: InterpString implies a class, when what you get is maybe a normal String. But maybe an InterpString class would be useful for some introspection? Or you could call refresh on your InterpString instance to refresh the values. (That would be cool!) Or it’s a utility class.

As I said I don’t yet see a perfect fit, I just think it’s worth thinking about these things. Maybe this approach could give the best of both worlds? Optimised creation and error checking at compile time, with syntax highlighting, and some runtime flexibility?

Anyway, peace on earth and goodwill to all SC devs!

S.
_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/