[{"data":1,"prerenderedAt":554},["ShallowReactive",2],{"project-32005678":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":9,"maker":10,"posted_at":11,"year":12,"points":13,"comments":14,"rank_in_year":15,"shown_in_year":16,"top":17,"tier":18,"category":19,"subcategory":20,"format":21,"keywords":22,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":44,"post_text":46,"what":47,"said":78,"maker_in_thread":163,"shape":173,"grid":177,"attempts":516,"same_week":517,"maker_shows":39,"maker_hidden":545,"reader_version":546,"card":547},"32005678","C3","A C alternative that looks like C","title","Show HN: C3 – A C alternative that looks like C",null,"lerno",1657135861,2022,182,136,322,2570,13,"notable","languages","programming language","other",[23,24,25,26,27],"c alternative","c3 language","systems programming","c compiler","defer","debated",0.081,{"positive":31,"neutral":32,"mixed":33,"critical":34},11,12,2,10,35,{"idea":37,"docs":40,"design":42},{"positive":38,"critical":39},5,3,{"positive":41,"critical":39},0,{"positive":38,"critical":43},4,[38,45,45,45,43,39,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,39,38,45,39,38,39,45,41,41,41,45,43,45,38,38,45,38],1,"Compiler link: https:\u002F\u002Fgithub.com\u002Fc3lang\u002Fc3c\n\nDocs: http:\u002F\u002Fwww.c3-lang.org\n\nThis is my follow-up \"Show HN\" from roughly a year ago (https:\u002F\u002Fnews.ycombinator.com\u002Fitem?id=27876570). Since then the language design has evolved and the compiler has gotten much more solid.\n\nAssorted extra info:\n\n- The C3 name is a homage to the C2 language project (http:\u002F\u002Fc2lang.org) which it was originally inspired by.\n\n- Although C3 mostly conforms to C syntax, the most obvious change is requiring `fn` in front of the functions. This is to simplify searching for definitions in editors.\n\n- There is a comparison wit",{"problem":48,"audience":58,"pricing":9,"motivation":67,"time_to_build":9,"stack":74,"openness":75,"stage":76,"team_size":77},{"value":49,"source":50,"evidence":51},"Gives C programmers modern conveniences like generics, defer and modules while staying C-like and ABI-compatible with C","maker",[52,54],{"id":53},"post",{"id":55,"by":56,"text":57},"32006681","_gabe_","This looks awesome! The main thing holding me back from switching from C++ to C is the lack of type safe generic programming. This language looks like it not only solves that,…",{"value":59,"source":60,"evidence":61},"C programmers wanting more modern features","commenter",[62,63],{"id":55,"by":56,"text":57},{"id":64,"by":65,"text":66},"32006865","rwbt","> I'm puzzled with what the market for these kinds of languages are. There's a significant number of C programmers who want something slightly more modern and convenient but…",{"value":68,"source":50,"evidence":69},"Maker wanted a C-like language with modernised features and a simpler, parser-friendly syntax",[70,71],{"id":53},{"id":72,"by":10,"text":73},"32007745","No, you misunderstand. There is no `struct Foo foo`. Unlike C `struct Foo` would only ever be valid at the top level. Neither `struct Foo foo` nor `struct bar Bar` works. The…",[],"open_source","beta","unknown",{"praise":79,"objections":92,"requests":118,"questions":130,"alternatives":143},[80],{"value":81,"source":60,"evidence":82},"Modules, defer and C ABI interop are appealing",[83,84,88],{"id":55,"by":56,"text":57},{"id":85,"by":86,"text":87},"32009388","sakras","Holy crap I’ve been wanting to make basically this exact language for a while now: C with modules and defer! I am wondering how strings are represented (I dislike the sentinel…",{"id":89,"by":90,"text":91},"32010591","childintime","A big win C3 explicitly opts out of are integer types named by their size such as u8\u002Fu16\u002Fu32\u002F.., yet explicitly sizes the types it does have. Another sore point in C: how do…",[93,104,111],{"value":94,"source":60,"evidence":95},"The fn keyword and declaration syntax are seen as unnecessary",[96,100],{"id":97,"by":98,"text":99},"32006455","FpUser","what is it with fn()? If we are so much into being terse then int abc() should be just fine. If we need readability than function() instead of fn() would do better.",{"id":101,"by":102,"text":103},"32006108","keikobadthebad","> requiring `fn` in front of the functions. This is to simplify searching for definitions in editors. You don't have to do that even in C, you can use this style for function…",{"value":105,"source":60,"evidence":106},"Not ready for production use; still alpha",[107,108],{"id":55,"by":56,"text":57},{"id":109,"by":10,"text":110},"32007993","You shouldn't use C3 on any larger project, but it could be an option for doing gamejams (with raylib or something else with a C API). For vkDoom it's not a port to C3. What it…",{"value":112,"source":60,"evidence":113},"The name C3 is hard to justify",[114],{"id":115,"by":116,"text":117},"32015315","euclaise","I think we do need a language like this, and that Zig\u002FOdin\u002FMyrddin\u002Fetc have the issue of having a syntax too different from C (Zig being the least offending; Hare is okay but…",[119,123],{"value":120,"source":60,"evidence":121},"Package manager and a larger standard library",[122],{"id":115,"by":116,"text":117},{"value":124,"source":60,"evidence":125},"Classes or RAII",[126],{"id":127,"by":128,"text":129},"32008143","synergy20","Awesome stuff. It seems like a C+ instead of C++ to me. I wish it has class\u002Fobject\u002Fctor\u002Fdtor\u002FRAII though, no need for exception. OOD in C using struct and function pointers are…",[131,135],{"value":132,"source":60,"evidence":133},"How stable is the compiler and will core features change?",[134],{"id":55,"by":56,"text":57},{"value":136,"source":60,"evidence":137},"How strings are represented",[138,139],{"id":85,"by":86,"text":87},{"id":140,"by":141,"text":142},"32007431","tialaramex","Aside - Documentation says: > It is possible to cast the variant type to any pointer type, which will return null if the types match, or the pointer value otherwise. That seems…",[144,155,159],{"value":145,"source":60,"evidence":146},"D's BetterC",[147,151],{"id":148,"by":149,"text":150},"32006837","WalterBright","Should compare with DasBetterC too! https:\u002F\u002Fdlang.org\u002Fspec\u002Fbetterc.html",{"id":152,"by":153,"text":154},"32007096","bachmeier","> I think Zig, D are examples of this niche but syntax wise they don't completely look like C. This is technically true, but someone that likes writing C while wanting a few…",{"value":156,"source":60,"evidence":157},"Zig",[158],{"id":64,"by":65,"text":66},{"value":160,"source":60,"evidence":161},"C++",[162],{"id":55,"by":56,"text":57},{"comments":164,"answered":34,"key":165},19,[166,167,170],{"id":109,"text":110},{"id":168,"text":169},"32014662","Thank you!",{"id":171,"text":172},"32011784","D's betterC is very nice. Very much worth looking at.",{"commenters":174,"max_depth":31,"maker_replies":164,"first_comment_mins":175,"lifespan_hours":176},64,21,378,[178,180,182,185,187,191,195,197,200,203,205,209,211,213,215,217,221,224,226,229,231,234,237,240,243,246,248,251,255,258,261,265,268,270,273,275,278,280,284,285,286,289,292,295,297,300,303,306,310,313,316,319,321,323,325,327,329,331,333,335,338,341,343,346,349,351,354,356,358,361,364,367,369,371,373,375,378,380,383,385,387,389,391,394,396,397,399,400,402,405,407,409,413,416,418,421,423,425,427,429,432,434,437,439,442,445,447,449,451,453,455,457,459,461,463,465,467,470,472,474,476,478,481,483,486,487,489,492,494,498,500,503,505,508,510,513],[55,41,38,179,56,41],"project\u002Fpositive\u002Fidea",[109,41,41,181,10,45],"maker\u002Fneutral\u002Fexecution",[183,41,38,184,56,41],"32013372","maker\u002Fpositive\u002Fnone",[168,41,41,186,10,45],"maker\u002Fneutral\u002Fnone",[188,41,41,189,190,41],"32009045","other\u002Fneutral\u002Fidea","chromatin",[192,41,45,193,194,41],"32010230","project\u002Fcritical\u002Fdocs","aidenn0",[171,41,41,196,10,45],"other\u002Fpositive\u002Fnone",[198,41,41,189,199,41],"32013226","JonChesterfield",[201,45,45,193,202,41],"32005937","addaon",[204,45,45,193,202,41],"32005989",[206,45,45,207,208,41],"32006632","project\u002Fcritical\u002Fdesign","Cloudef",[72,45,41,210,10,45],"maker\u002Fneutral\u002Fdesign",[212,45,41,210,10,45],"32006114",[214,45,39,210,202,41],"32006222",[216,45,41,210,10,45],"32007841",[218,45,38,219,220,41],"32008170","project\u002Fpositive\u002Fdesign","mst",[222,45,39,223,202,41],"32006268","project\u002Fneutral\u002Fdesign",[225,45,41,210,10,45],"32007855",[227,45,39,223,228,41],"32006188","brabel",[230,45,39,223,202,41],"32006719",[232,45,41,233,56,41],"32006516","commenter\u002Fneutral\u002Fdesign",[235,45,41,236,208,41],"32006613","commenter\u002Fcritical\u002Fdesign",[238,45,41,233,239,41],"32006886","boardwaalk",[241,45,41,233,242,41],"32006977","Ontonator",[244,45,41,233,245,41],"32007274","Bytewave81",[247,45,41,233,242,41],"32030640",[249,45,41,233,250,41],"32007668","hvdijk",[252,45,41,253,254,41],"32016763","commenter\u002Fneutral\u002Fnone","xigoi",[256,45,41,233,257,41],"32018666","lwswl",[259,45,41,233,260,41],"32007909","SV_BubbleTime",[262,45,41,263,264,41],"32008480","other\u002Fcritical\u002Fdesign","adamius",[266,45,41,267,208,41],"32012115","other\u002Fneutral\u002Fdesign",[269,45,41,233,264,41],"32013287",[271,45,41,233,272,41],"32012256","Findecanor",[274,45,41,236,264,41],"32013593",[276,45,41,233,277,41],"32015064","duped",[279,45,41,253,264,41],"32019639",[281,33,41,282,283,41],"32006647","other\u002Fcritical\u002Fidea","EdSchouten",[64,33,41,189,65,41],[152,33,41,189,153,41],[287,33,41,267,288,41],"32007891","com2kid",[290,33,41,282,291,41],"32013641","__d",[293,33,41,282,294,41],"32017620","Gibbon1",[296,33,41,267,288,41],"32018395",[298,33,41,189,299,41],"32006925","0xFACEFEED",[301,33,41,189,302,41],"32007618","stormbrew",[304,33,41,263,305,41],"32008109","smingo",[307,33,41,308,309,41],"32010172","other\u002Fneutral\u002Fnone","labrador",[311,33,41,233,312,41],"32010356","stkdump",[314,33,41,233,315,41],"32011742","scoutt",[317,33,41,233,318,41],"32011837","mh7",[320,33,41,233,315,41],"32011953",[322,33,41,233,312,41],"32012330",[324,33,41,233,315,41],"32013488",[326,33,41,233,312,41],"32018908",[328,33,41,233,312,41],"32012282",[330,33,41,233,315,41],"32013324",[332,33,41,233,312,41],"32024298",[334,33,41,233,302,41],"32019518",[336,33,41,337,312,41],"32024536","commenter\u002Fneutral\u002Fperformance",[339,33,41,308,340,41],"32007687","jonathankoren",[342,33,41,308,199,41],"32013309",[344,33,41,308,345,41],"32010177","kaba0",[347,33,41,308,348,41],"32007747","0x20cowboy",[350,33,41,308,288,41],"32007916",[352,33,41,253,353,41],"32009014","asveikau",[355,33,41,253,288,41],"32009878",[357,33,41,308,345,41],"32010193",[359,33,41,253,360,41],"32010886","markdestouches",[362,33,41,253,363,41],"32010939","mbel",[365,33,41,308,366,41],"32011229","bipson",[368,33,41,253,10,45],"32012333",[370,33,41,253,366,41],"32012811",[372,33,41,308,348,41],"32019593",[374,33,41,253,10,45],"32011814",[376,33,41,308,377,41],"32007840","kloch",[379,33,41,308,220,41],"32008278",[381,33,41,308,382,41],"32010638","billforsternz",[148,39,39,384,149,41],"project\u002Fneutral\u002Fnone",[386,39,41,308,353,41],"32009341",[388,39,41,308,149,41],"32009583",[390,39,41,253,257,41],"32017751",[392,39,41,308,393,41],"32009592","mhh__",[395,39,41,308,10,45],"32012502",[85,43,38,179,86,41],[398,43,41,223,10,45],"32011836",[140,38,45,207,141,41],[401,38,41,223,10,45],"32008098",[403,38,39,404,220,41],"32008311","project\u002Fneutral\u002Fidea",[406,38,41,308,10,45],"32012311",[408,38,41,308,220,41],"32024312",[410,411,38,219,412,41],"32009202",6,"msla",[127,414,39,415,128,41],7,"project\u002Fmixed\u002Fidea",[417,414,41,308,257,41],"32018247",[419,420,41,308,393,41],"32008769",8,[115,422,39,415,116,41],9,[424,422,41,384,10,45],"32043925",[426,422,41,384,10,45],"32043936",[428,422,39,404,116,41],"32191680",[430,34,41,308,431,41],"32013172","sylware",[101,31,45,433,102,41],"project\u002Fcritical\u002Fidea",[435,31,41,308,436,41],"32006181","IshKebab",[438,31,41,308,208,41],"32006750",[440,31,41,308,441,41],"32007187","oaw-bct-ar-bamf",[443,31,41,308,444,41],"32007704","wruza",[446,31,41,308,340,41],"32007743",[448,31,41,308,208,41],"32012028",[450,31,41,308,444,41],"32012135",[452,31,41,308,340,41],"32007732",[454,31,41,308,208,41],"32011995",[456,31,41,308,340,41],"32021803",[458,31,41,308,436,41],"32012234",[460,31,41,308,208,41],"32011992",[462,31,41,404,10,45],"32006187",[464,31,45,433,102,41],"32006281",[466,31,39,404,220,41],"32008334",[468,31,45,433,469,41],"32006330","gnulinux",[471,31,38,179,102,41],"32006384",[473,31,38,179,469,41],"32013477",[475,31,39,404,257,41],"32018382",[477,31,41,233,469,41],"32031851",[479,31,45,207,480,41],"32007191","ChickeNES",[482,31,41,233,10,45],"32008028",[484,31,38,219,485,41],"32008502","oconnor663",[89,32,38,219,90,41],[488,32,41,210,10,45],"32012529",[490,17,39,404,491,41],"32012044","pratk",[493,17,41,210,10,45],"32012541",[495,496,38,179,497,41],"32006132",14,"axy",[97,499,45,207,98,41],15,[501,499,41,233,502,41],"32007667","azinman2",[504,499,39,223,302,41],"32007707",[506,499,41,233,507,41],"32011031","lelanthran",[509,499,41,233,302,41],"32017896",[511,499,38,219,512,41],"32007733","yellowapple",[514,499,39,223,515,41],"32008503","throwawaymaths",[],[518,523,527,532,536,541],{"id":519,"name":520,"points":521,"category":522},"31988820","pamspy",235,"security_privacy",{"id":524,"name":525,"points":526,"category":522},"32002555","human eyes only",216,{"id":528,"name":529,"points":530,"category":531},"31958823","Copper",146,"dev_tools",{"id":533,"name":534,"points":14,"category":535},"31932434","Featureform","ai",{"id":537,"name":538,"points":539,"category":540},"32001817","SPS2022",132,"web_saas",{"id":542,"name":543,"points":544,"category":531},"31936356","UI Filler",129,false,"v2",{"id":548,"name":5,"line":6,"ai":545,"cat":19,"year":12,"points":13,"comments":14,"rec":28,"s":549,"top":17,"kw":550,"maker":10,"domain":551,"tier":18,"attempts":41,"strip":552,"url":-1,"mix":553,"praise":81,"objection":94,"sub":20},32005678,0.08,[23,24,25,26,27],"","5111430000000000000000035135310001415515",[31,32,33,34],1793991048388]