On 30/12/2013, at 12:36 AM, srean wrote:

> So are the separately compiled pieces not whole program optimized anymore ?

That's right. Both plugins and any other ordinary library accessed by a C 
interface
has no access to the bodies of the functions it is accessing.

Felix code which is "separately compiled" is in effect a C library and the
interface generated is in fact the same interface you'd hand write
for any external C library.

So you cannot, for example, "inline" one of those functions because all you know
is the name and type, the definition is hidden.

i might "add a feature" which allows some functions to be "exported" with
their bodies to allow them to be inlined .. after all C++ can do this so Felix
should too.

But at the moment I'm still trying to figure out what CAN be exported.
For example at the moment you cannot export a function that has
tuple or record arguments,because the C++ types for these depend on
the the exact details of what flxg is translating: all structurally typed 
entities
(i.e anonymously typed thingos) are given synthesised names including
a counter which is then incremented, to ensure uniqueness, so the names
of the types in two programs will be different at the C++ level.

So without trickery the C++ interfaces won't type check even though the
Felix level ones would.


> Even if they are not, it might still be a pragmatic way to build a piece of 
> software.

For most functions you just don't care, particularly since Felix is a 
"scripting language".

For example the build tools themselves, they're fast enough in calling the C/C++
compiler or flxg. All the slowness is in the Felix and C++ compilations.
The tools would be fast enough in bash, Python, or anything else.

It's not obvious but Felix was always intended to be an ordinary old
dynamically typed scripting language. Its just that unlike, say, Python,
which has a rigidly fixed system of abstractions (see Python type records),
Felix can do anything because the core is arbitrary statically typed
efficiently compiled code.

Ultimate all programming system have "dynamic typing" because they
all have "data" that has to be interpreted. Unlike other system Felix
provides a lot more flexibility deciding where the boundaries are.
So at this point, having put a lot of effort into static typing and performance
its time to do more dynamical stuff like "objects" and "serialisation" and
other things more often associated with scripting languages.

Some kind of "xpath" for "JSON" object would be useful for example.

--
john skaller
skal...@users.sourceforge.net
http://felix-lang.org




------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to