Let say I want this then:

public int totalAmmount()
{
  return SELECT SUM(ammount) FROM Invoices WHERE invoiceNo =
Invoice.currentId();
}

That is now there is Java nested inside the SQL. When I ask the IDE to
list all references to Invoice.currentId(), this instance should also
be included.

There was some paper on macros that solved this with varios nestings
of ?() or some such construct. But that isn't very readable when you
add lots of back and forth.

Oh well, it isn't a project I'm working actively on, just a wild idea
for the future ;-)

BR,
John

2011/6/15 Ondřej Bílka <nel...@seznam.cz>:
> On Tue, Jun 14, 2011 at 01:04:20PM -0700, BGB wrote:
>> On 6/14/2011 12:14 PM, Michael FIG wrote:
>> >Hi,
>> >
>> >John Nilsson<j...@milsson.nu>  writes:
>> >
>> >>So my fix is to make the separation a hidden thing, which means the
>> >>program needs to be represented in something that allows such hidden
>> >>things (and I don't think Unicode control characters is the way to go
>> >>here).
>> >Why not crib a hack from JavaDoc and make your nested syntax embedded in
>> >comments in the host language?
>> >
>>
>> or, like in my languages (generally for other things):
>> use a keyword...
>>
>> reusing prior example:
>>
>> public int totalAmmount(InvoiceNo invoceNo)
>> {
>>   return SQLExpr {
>>     SELECT SUM(ammount) FROM Invoices WHERE invoiceNo = :InvoiceNo;
>>   }
>> }
>>
>>
> Well you can embed languages easily using fact that in any sane language 
> parenthness match
> unless you areb inside string.
> You could get pretty strong preprocessor in few lines like my preprocessor 
> which I attach.
>
> It has one command
> register(name,command)
> which replaces all subsequent occurences of name(args){properly parenthized 
> text}
> by output of command with args given and text pasted as input.
> --
>
> Big to little endian conversion error
>
> _______________________________________________
> fonc mailing list
> fonc@vpri.org
> http://vpri.org/mailman/listinfo/fonc
>
>

_______________________________________________
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc

Reply via email to