From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.help Subject: Re: Check for redundancy Date: Sun, 28 Jun 2015 22:38:42 +0100 Message-ID: <877fqnpl7h.fsf@robertthorpeconsulting.com> References: <87twtrn86z.fsf@nl106-137-147.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1435527553 20109 80.91.229.3 (28 Jun 2015 21:39:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Jun 2015 21:39:13 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Emanuel Berg Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 28 23:39:00 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z9KHz-0004FY-Mg for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Jun 2015 23:38:59 +0200 Original-Received: from localhost ([::1]:39943 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9KHy-00026o-Vo for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Jun 2015 17:38:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9KHo-00026X-UM for help-gnu-emacs@gnu.org; Sun, 28 Jun 2015 17:38:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9KHl-0002Ym-O7 for help-gnu-emacs@gnu.org; Sun, 28 Jun 2015 17:38:48 -0400 Original-Received: from outbound-smtp02.blacknight.com ([81.17.249.8]:50635) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9KHl-0002Yb-Hu for help-gnu-emacs@gnu.org; Sun, 28 Jun 2015 17:38:45 -0400 Original-Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp02.blacknight.com (Postfix) with ESMTPS id 8090498F40 for ; Sun, 28 Jun 2015 21:38:43 +0000 (UTC) Original-Received: (qmail 9933 invoked from network); 28 Jun 2015 21:38:43 -0000 Original-Received: from unknown (HELO RTLaptop) (rt@robertthorpeconsulting.com@[109.76.222.229]) by 81.17.254.9 with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 28 Jun 2015 21:38:43 -0000 In-Reply-To: <87twtrn86z.fsf@nl106-137-147.student.uu.se> (message from Emanuel Berg on Sun, 28 Jun 2015 17:50:28 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 81.17.249.8 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105266 Archived-At: Emanuel Berg writes: > writes: ... > Indeed. For untyped languages, why put the types in > code where they aren't actually types anyway? Just because there aren't types doesn't mean that variables don't have types. What "untyped" means is that the language doesn't enforce typing for you. That makes it more important that you manage them carefully for yourself. > And for > typed languages, why put them in code where they still > aren't types and even more, where they can indicate > the *incorrect* type as well? As I said, one reason can be: because the framework or library you're using doesn't use the type system fully. That's the situation with the MS Windows interfaces. I agree with Yuri Khan that it's useful in other situations. Khan's examples depend on how broadly you treat the word "type". Khan is treating things as types that you don't think of as types, his definition is a bit broader than yours. There are arguments for both ways of looking at things. Another thing that it's useful for is differentiating a type from instances of a type. For example, many people use "something_t" as the type and "something" as the instance. I prefer to be more specific, e.g.: "something_s" for a struct and "something_e" for an enum. BR, Robert Thorpe