3 ms·
I wonder what programming languages look like? I'd guess a lot like natural language?
by w_t_payne 10y ago
I wonder what programming languages look like? I'd guess a lot like natural language?
- xtacy 10y agoNot quite, but as the paper says: Corollary: No probabilistic regular grammar exhibits criticality. In the next section, we will show that this statement is not true for context-free grammars (CFGs). That is, there exists CFGs that exhibit criticality. Programming languages are often parsed by CFGs, so it's likely that some programming languages exhibit the same criticality structure as natural languages.
- rntz 10y agoI think that means only that programs written in a language described by a CFG could exhibit "criticality", not that they will. "Exhibiting criticality" is a property of a distribution (e.g. a corpus of human-written programs or an algorithm for generating programs), not of a grammar, IIUC.
- laretluval 10y agoThey say their results from Wikipedia data were influenced by XML tags, so programming languages might look a lot like their Wikipedia data. For reasons like this, I don't trust their empirical results at all.