Everything is anonymous (functions)
1
Name:
Anonymous
2012-06-15 23:05
I want a language where every function is anonymous.
Is it possible to do this without closures and GC (shit) everywhere?
I suspect it isn't, unless you add the parent scope as implicit arguments to every single function call/defintion via syntactic sugar... and the alternative, non-anonymous functions, means you have two separate concepts of scope
Another approach would be to use trampoline functions on the heap like gcc does for nested functions, which require stack offsets into the original evironment scope. The tradeoff is of course you can't return a function from an inner scope (would you consider that acceptable in a language design?
2
Name:
Anonymous
2012-06-15 23:13
>>1
GC (shit)
Just because you can't code one that isn't shit doesn't mean nobody can.
3
Name:
Anonymous
2012-06-15 23:19
>>2
I accept the criticism, but the purpose for which i want this language design isn't a domain where a GC would be appropriate.
Maybe refcounting - at least some form of automatic deallocation is going to be needed to tidy up trampoline functions - but nothing more.
4
Name:
Anonymous
2012-06-15 23:29
Another technique for a fully-anonymous language is to never call any function via a function pointer directly, instead using a tuple with an environment pointer. This means that you have enough information to call a nested function without a trampoline, and environments can still have lexical scoping, but all variables (a) must be big enough for two pointers (reflected in the calling convention), and (b) basically turns the language into java with some syntax changes
5
Name:
Anonymous
2012-06-15 23:38
Stop using spoiler tags unnecessarily.
6
Name:
Anonymous
2012-06-15 23:43
ANONYMOUS IS LEGION!
7
Name:
Anonymous
2012-06-16 0:17
>>1
it could probably be done as a stack based language; just get rid of the ability to define new variables.
Would you still allow named function parameters? If so, you could translate function defintions like:
function a() {
a_code a_code
}
function b() {
b_code b_code
}
function c() {
c_code c_code
}
code a(code) b() c() code
to
(function(a, b, c) {
code a(code) b() c() code
})(
function() {
a_code a_code
},
function() {
b_code b_code
},
function() {
c_code c_code
}
);
8
Name:
Anonymous
2012-06-16 0:20
9
Name:
Anonymous
2012-06-16 0:45
>>3
Why would you want a language filled with anonymous functions that doesn't clean them up afterwards?
10
Name:
Anonymous
2012-06-16 4:20
what about a purely oop language with only anonymous functions?
11
Name:
Anonymous
2012-06-16 4:50
I want a language where every function is anonymous.,,,,,,Is it possible to do this
Lambda Calculus......duuuuh
12
Name:
Anonymous
2012-06-16 8:43
>>6
And thus we should name the language
Legion .
13
Name:
Anonymous
2012-06-16 20:56
敒䅢䆖蘷蠨㤴ऐ㍈䚆㚒ㆈቁ㠶ԉѳ♘憒ㅲ酸錤靣梐✑扩Ш恀ㄒ杄須┓錥嘐恥䤙灰攰茅摘偤ቖ蠷奵栘䌡䁁猥ᒗ扤ɢ襓靠Ԣ畑靥ሳ䡳抁琉煆冐犂ز刣硐啰␄璈頰折瑳则␙ᘅ撇䐓䆘░呱蠲⎄錣⅄䖒杖堰⎙㉐䒄䅙䠰Ԅ㖘蝁塖㝠划ጘᑁ☆⍄卉⡩䖓ℐ礔⢘╨㉙ɂᠩ⁒慨撆㜸⁶恇礐慒̑⢕餔ɳ匨這眔〱捕䌅Ѣ阱疒報✷ᒐ摐錳晀睇陕霑允ᙘጣ㉩䡄ᅖ┒⌰☖䌤Ⅸ䢂䠈ဤ董砱愑垃扄ᑹڂᅆ͒⑥⅘➄顒☱虱⒕摧䊔葱㠶眀顲焠萔ͳ熓榑⠥䆕ࡇ❰碕र↘暀䝠琴♆疁䐄閈挲㉤ݵ͗╶袘扢畣⚁㎀鍄䁷陳恩ᦁ钓☠ᔵ䂓မₘ顅靶䚀蔠莓ܙ䒐瑂㠂⡉䡅㖅㉉գ䉴ȶ熒ဂ邒葈䁣␡杔砄〡晖䈵蔘ↈ㔇㈹㥖礳葕霆鉔劇ᥒ锈炕虈荷㜕މႂᝧ⥳颅畡!吢ހ扄礷ं䄆㥠㥸̤䦆䅴衱偅䂙怇馅蜇㕗㑃Ը祤┘玖萸ㅐ䑂瘖敀砩內鑶杕
14
Name:
Anonymous
2012-06-16 20:57
Try Unlambda
15
Name:
Anonymous
2012-06-16 21:21
慂㡄㙐ࡉ特呱梃ᐰ⍄摵厗☂倴䌀䑔祃喅ԡ馀䡤㍐疂䑧㦅㔱焙摀㙥စ䕠䑂㘓妓猦䀩鄵ሰ㝗⤀㍁⥆硨բ饲戧䥐䆃灳砓蔄虳逆興膃袀をㄙ鑗┑㈦鑈恆䦅ࠢ䀓萸䠄⠅➘椘͉㡨坃䅙⒐璕ɐͳ㐸С㍤袂ȑで悔䡖咑夈瀣䥱瑁恐暙㕴㉷Գ襄喉♤敲⑨䢒恅⡸䌱戩䦓㠃噀ⅆ⢖ः恘餶鑖Ԗ瞇ၹ䈴〓iᡴޗ掅ᔰ倧≑褶ᠢॅ衠䡥㒀頀ޙ㍀耱䁹ᑧȆ㥤ᅂ҄椡搡☵怳ڃᑣ⢉䖖䔦倆䝘ᔳ℉蜑怠睤堕♩皅℩獃㌄䂔考捵锇奈উ䑥摲鍘砅㕷☩隅よ荱Ȧ襰犗鍳ᠨ゙腩द⁶䘖㞆ᅠ的䀴刃楅碃覆⠓ᢉ瑡瑄䙕դ㥢遆匡䝕剕摁牳4䀁
16
Name:
Anonymous
2012-06-16 21:37
ͷᘔ䅃इ∐馆莅砒葀畉✀焸肅ᅕ䉤遅艓晕ㄓه捔䢅螐艖荨爣䀸喓؈㡒灢䝑耲挷褹腧䑙噡圴券搷奷⎄顓㝓䝶頥㜣⤓腩ᙦᑠㄲȐ楐ᄷ䌖䌆㎐题夑҄鉡Ҁᒗ✶३│㉶䐖腹搐䦔祰蘧蔨䖅蘨▒✓䡡䈡鐃焅剤獷䄵ሐ悘這閇褓ℒ吴抅䅶∢脖㆙靖䂆瘅⒈邇㙲ၵ㘙晣䁙蝔蠰蝤摁6㝸␣瑸ㅖ蠖獘蒇冀隅ቖ♧၆焉⢖㜑ㅙ样䕲塥陳瀒䅈㖕✕ㅠᚑ煐ᕠ№ᑱ楶अ悑䜔䄁霱襂ᅵ㢑㍀钗㐄㦔❀ॅᖑ蒙掔瑧梄聂頔處爐晓䔸䍡閗祳陴礖蔧玈ᝦٖࡦᥱ㡖ሑ靦㦇嘧䜕芈偕癗摹阢᎓垘琱ᕗ└㦕蜒ع奆Ɨ榕㕠ᜧㅲ冀䕳萧⌡禘ظ瑇馘͓⥴晅膒霷杸餁⍣剃皙杹船Θ螉錢莑㞉▇咔螑鍰䄘险㡇ᦇ琑ę瘳頰䍡嚀᠓塱偘硹捅猔䄳ᖉ̓䔀愠⤸䜐䐙卦䡵ᥨ蝀蝵蘖⒃爕蒀蒈▖⑅砦٘ᘢ摒ㄣᤗᚇ≀瑶螐匶ၰᝩ螁芃荶悇䥀昄閉蔵鉑猁禇㜧
17
Name:
Anonymous
2012-06-16 22:04
ह禒冕艷搴∲┓㉈ゕ䚖领⁴ى䌃㙡猵㑨䝠㕣噖䑗ᑢ䄖䥷偀灵䎉慢䡒猧⥹䍓⎗偦镹垂ᜠ䕴倃析㐗㠶⥀逥䈢䦘猩鑴钗㡨✇䝘䝙䦘ㅠ怀р䖑脑չ靀芖ᒖ匸ᢑɶē憖⚘剓锕葡葓刘途䝄隙Œᚅ晕ၴ̈ၘ衢ᅰ≣蘸或ᥑs戵邒䌱e∰阇℥⥔⦈䀲桵萹梗杴㈷㐑扸砲ⁱ玉鞗㝦↙煰㔅ᡸ薄ᕁ杶扃唗Շ㔰啓搸的遥㝰複易塩ᆙށ犐慙ሑ䢉㔆ड牶舀陷ࡸޗ傁⦕瑓熁є砒癱砶葈䖑喉鉤 襔⌇उ饀荙ݘ䔑呧‧遉䌙䕩煓䁨䜱斄顢ႀ契⥸㊑馒戴蕁㕲͔⤗褓蠳桁ᔂ☗⤀扆蝁ܱ戃銅遴斕葱℠㑈靳∀扴蜔妔㦑蠒愔Ȱኔ餷㔃虰䑉ᐒ椳怹ℹሑ爣獷⠅ڃ暖脣怱Ⅴ⒘㡑腁∶⍶ᖖ隖噇晉䀕睳蜈錖饔癔鐣₄睕栶礹♒假ᜑ㐧啉炖⌄馇䀤眈昳ᙹ猁荓ؓ垈唱न腂㑑昩ᔲ栥鉘䀖倃癧ᡉ䅕榄匕じ斃䐣閘⚙鉃朧ݶ饥㔱@畩䅤ᄃሣ蒕蠅⤉
18
Name:
Anonymous
2012-06-16 22:40
㐐斘夳顨逄斈ر硄䡸蘡塁Ȑ₈須މ⌢䞔耖愶ᡑ䁴―̓榃㐰䈦獨㡆⍂坣摴㔕ᡱ硦無蝙䉶顸㠤硙ܗ道牓℁㙕ᔱゑ畗䙂٘坑ᤓ锕ᅃ⡑癷ᑗ䄢ȁ蕹靑瑥ᐔㄈ䉁″恘⤖䅳夣膉瑰✆ႄ契⡔坧⡨批噒⊁♈捀ᠲ喆ؕ䝁ԩ墘搥✂禑㠶耇昕煡儁ᐗ≈䁰硥剒␅祅咗᠒၇䄧䞔Ԓ坢ܰ䠧榃Ѣ㠇镳ₓፘ鄰襲†艳̵圄獕у頇禅ၣ昨鎇䑆遠╴䥀⢘ቔᘙ蠀ࠩ道⌐䦉睶䊂፲ᤓ蘡➇ع颕យ楄䥦∐蚒މ恉❈祥ɒ圗ↇ蜹瑥冉鍶奁Ⅸ∴蕄ᖙ堗荇摓䤙ᑣ䁦㡶阄⑀頢晥捠瘕鐀Ē焈違′ႅ週匒①预㑴舰䞈Ȑ㉸‗煗褥蠲䝶錈饂朇噄戇锆肕䂂ᔅ扖̢ɐ邀蝱ޔ境唅ᝈ院甅ၙ礤虈よ靃ᑶ夐恗ࠇ䁓ɰ錤堧‘墉䘰䈉梓х䝔噤霓肅圥䤷ᘰ摠ᅩ⡁䞄襐厙䈤杳朖襁ᚘ❙ᚖƄ虥┣脔㊐В㥤匂眨⦘虖襹捥霂映⢓呤瀑䍕銁芆镇慲ᄧ㙀ᖒ᠒霧❠椡腡䁑
19
Name:
Anonymous
2012-06-16 23:17
悔畈煡ސ锨ᖕᔘᙄ䐘すŕ⥗㈲䁆祁處衰䄸⒐抄✄⤑猡瞉ॳ馁❷ᚇ銇⌓ङᐙᙦኀᄔ鈵硵覅䥸蠖塅剨ㅔ遁畨阑Դ݇挂噷䊀剙撆ቖ㡴蕒耙啣፷݇捡梓ᥧᅡ煓䍩ٰ瑀墇鎗′节硇䆙舥灁〶䁔灰⑵䕂遖傓鉳䆒ㄘض酔ㄒ䎕恄耦䉸饓栱腅䜘䙇圳☩獑䕵❕㑱⦉䘐卷ᥥΒ蔆挧褰馁ᡂ〣ᘑ昢阅䠤䤸ㄶ怡锩ᡤ祒┆朔閅錙鞈腉捅順餁聅ၷ荙冘ၵփ挅刖袖㕤荗₀႒㡕䌦⥁荱蒑㜳䝖栴獒䢂噤桢፱酱䍈褉≓坳ㅣ襉؆眘聕㡱䐴㡤畒碇顁捂镣ሇ灨⒑⌲♕䕳虩匨⑳㢃碗ޗ砧枖吓瘂つᡕ戠⤂Ȕ甥ᥗ梙ᜀ敔嘠顆┈㌳᐀ᖙ礦ѓᅖ瀒怆䠖㥖㜰噁坱䔑̅㞈䌰琶喉ɰ❗街⍓聖牒ނ阧葹颅䘉㞑塁煔锁夵熂陈荳倱ބ喗ᢙ∥塁㐁ᘠ䅆皁䕘ᤐ鐐犈̥螒戳䢄ᦕ袐ᔰኂ႙嘕⑩㥠ࡅ灴㔈蘹偁耙剧癱☔⅁蠙䘇炒ቧه啄ॴ皀⍐⥷咁扇鉖ɶաᑵ
Newer Posts