funq: syntax that doesn't scare off C++ developers

Aaron J. Seigo aseigo at kde.org
Sat Jul 26 14:11:25 UTC 2014


On Saturday, July 26, 2014 11:14:29 Samuel Gaist wrote:
> Just to be sure, let say the core namespace is funq, would it look like
> 
> public funq 1.0
> {
>    public std 1.0
>    {
>        public debug 1.0
>        {
>                func log(value) { pretty_print(value); }
>        }
>    }
> }

I'd prefer something simpler like:

public funq.std.debug 
{ 
....
}

(or just funq.debug)

public funq.process
{
....
}

It's a simplification to be sure, but I'd like to avoid nested modules for a 
few reasons (the horror of massive indentation and curly-brace-nesting hell; 
simpler scoping rules; parser and compiler simplicity)

This does remind me that for libraries modules also need the public tag so 
that modules can be hidden as internals. Will add right now!

> On a side note, is there already a file naming convention ?
> 
> Also, how to regroup several fqt files as a library ?

Undefined at this point. There's an empty "packaging.md" file in docs waiting 
for someone to fill it in. Since the idea is to compile things down to 
bytecode, it would make sense to have define a file system layout for where 
those resulting binary files should end up. It may also make sense to have a 
standardized layout for source code distribution. In both cases it ought to 
specify a metadata file containing at the minimum licensing information. Being 
able to automatically check the licensing status of an application will be a 
godsend.

I'd like to see this modeled after existing best practices in QML, Java and 
Plasma::Package. .. and not because I think any of those have awesome 
mechanisms, but because they are what our audience will already be familiar 
with (I'd put C++ in there if there was anything like a distribution standard 
:)

I'd be quite fine if someone wanted to take on the task of writing up a draft 
specification for this ...

-- 
Aaron J. Seigo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://kde.org/pipermail/funq-devel/attachments/20140726/e78b9faa/attachment.sig>


More information about the Funq-devel mailing list